yarn add @angular/cli
yarn ng new angular-newbi
cd angular-newbi
yarn ng serve --open
하면 실행됨
app.component.ts: 타입스크립트로 작성된 컴포넌트 클래스 파일
app.component.html: HTML으로 작성된 컴포넌트 템플릿 파일
app.component.css: 컴포넌트의 CSS 스타일 파일(해당 컴포넌트만 가짐)
app.component.spec.ts: 컴포넌트 단위 시험을 위한 파일
html에서 Welcome to {{ title }} 이 수정한다. 이중 중괄호 표현은 Angular의 인터폴레이션 바인딩
yarn ng generate component heroes
Welcome to {{ title }}!
'Dev > web' 카테고리의 다른 글
[angular] 서비스를 모듈로 만드는 이유 (0) | 2019.12.02 |
---|---|
[javascript] Unable to preventDefault 에러 (0) | 2019.12.02 |
angular start (0) | 2019.11.14 |
[NestJS] 소개 (0) | 2019.10.28 |
[angular] component와 service (0) | 2019.09.10 |
[web] 세션과 토큰 (0) | 2019.09.04 |