2018/02/16 (1) 썸네일형 리스트형 [Angular] index.html, app-root, ngModule @angular-SPA(Single Page Application) -index.html (in default) @what is the app-root in index.html-실제로 index.html를 크롬에서 보면 에디터에서 보이지않던 코드가 마지막부분에 추가되어져 있다. 이건 ts가 컴파일되면서 main.ts에 있는 컴포넌트 정보등을 추가한것으로 main.ts를보면 appModule정보를 참조한다. 그 appModule를 보면 안에서 appComponent를 정의, 선언하고 있다.(declarations) 그리고 appComponent안을 보면 컴포넌트의 selector 즉 선택자가 app-root로 되어져 있다. @간단하게 설명해보자면, index.html의 app-root는 다음과 같은 경로로.. 이전 1 다음