Frontend/AngularJS
기본 구조 (Angular, AngularJS 아님)
필리힐리
2021. 9. 18. 23:02

기본 index.html이 웰컴 페이지로 설정되어 있다.
main.ts -> app.module.ts 실행 -> app.module에 등록 되어 있는 컴포넌트 app.component.ts 실행
-> app.component.ts 안에 있는 selector, templateUrl, styleUrls 3가지의 정보를 토대로 html, css 실행

AppModule 호출

등록되어 있는 모듈들
AppComponent 호출

AppComponent 객체를 @Component를 통해 모듈로 등록
selector : 태그 이름
templateUrl : html 경로
styleUrls : css 경로

app.component.html을 들어가보면 이렇게 구성되어 있다.



app.module.ts에 모듈로 등록되어 있는 HelloComponent의 정보를 토대로
app.component.html의 태그 <hello></hello>가 실행되었다.