Angular Add Component

1. 수동으로 Component 생성 사진1) manul 폴더및 파일생성 // src/app/manual/manual.component.ts import { Component } from '@angular/core' ; @ Component ({ selector : 'app-manual' , // component명칭을 작성한다. templateUrl : './manual.component.html' , // 해당 component가 사용할 html 템플릿 주소를 입력한다. }) export class ManualComponent {} 코드1) ts파일 작성 <!-- src/app/manual/manual.component.html --> <h1> This component was build by manual! </h1> 코드2) html파일 작성 // src/app/app.module.ts import { NgModule } from '@angular/core' ; import { BrowserModule } from '@angular/platform-browser' ; import { AppComponent } from './app.component' ; import { ManualComponent } from './manual/manual.component' ; @ NgModule ({ declarations : [ AppComponent , ManualComponent ], // declarations에 components class를 추가한다. imports : [ BrowserModule ], providers : [], bootstrap : [ AppComponent ], }) export class AppModule {} 코드3) 앱 모...