ㅁㅁ

jungeundelilahLEE·2022년 2월 24일
0

Angular

목록 보기
4/4

컴포넌트 (component)
모듈 (module)
서비스 (service)
지시자 (directive)
라우터 (router)
템플릿 (template)
의존성주입 (injection)
파이프 (pipe)
폼 (form)
애니메이션 (animation)
보안 (secure)
HTTP (HTTP)
생명주기 (life cycle)

컴포넌트 (component)
: building block (켜켜이 쌓여있는 components)
모듈 (module)
서비스 (service)
: 앱의 코드를 구성하거나, 공유하는 데 사용 (데이터 접근 method를 생성할 때 사용함) / 컴포넌트에 제공하는 목적의 외부에 정의한 클래스
지시자 (directive)
: html 요소에 동적인 기능 or 동작을 추가하는 요소 / component, structural, attribute 의 3가지 종류
라우터 (router)
템플릿 (template)
의존성주입 (injection)
파이프 (pipe)
: 템플릿의 데이터를 내가 원하는 방식으로 보여줄 수 있는 기능
폼 (form)
애니메이션 (animation)
보안 (secure)
HTTP (HTTP)
생명주기 (life cycle)

장식자 (decorator)
: plain 타입스크립트를 component로 변환 / 함수가 실행되기 전, "반복적"으로 선행되어야 할 명령을 별도의 함수로 구현한 후, 이를 한줄의 명령어로 호출하는 방법 (@를 붙여 호출함)



컴포넌트

  • 컴포넌트의 역할 : Template과 class를 바인딩 (이벤트 전달 or 데이터 전달)
  • @Component ({
     	selector : 'my-component' // => 컴포넌트의 지시자
        template : '{{msg}}' // => 템플릿 UI
     })
     
     // => template과 class를 "바인딩"
     
     export class MyComponent {
     	// => 컴포넌트에서 사용할 로직
     	msg :string = "Hi Willy!";
        ...
     }

profile
delilah's journey

0개의 댓글