2020. 10. 3. 22:12, Developer
module 에 declarations 로 사용 컴포넌트를 정의하며,
imports 해서 module을 참조한다.
declarations에 사용할 컴포넌트가 없는데 사용할수있다?
그것은 module을 import 했기 때문이다.
그리고 그 module 역시 module.ts를 보면 experts 한다고 써놨을것이다.
뭐, 이렇게...
exports : [
TestComponent
],
의존성 주입이라고도 한다. DI.
어려웠는데 구조를 아는것이 거의 절반 아는것이다...라는걸 느꼈다.
아직 앵귤러 실무는 안해봤지만.
==========================================================
@NgModule({
declarations: [
AppComponent,
HelloComponent,
HeaderComponent,
FooterComponent,
SectionComponent,
TimeDisplayComponent,
ButtonsComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
LayoutModule
],
exports :[AppComponent],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
'Developer' 카테고리의 다른 글
[Angular]AppRoutingModule로 화면 주소 redirect하기2 (0) | 2020.10.04 |
---|---|
[Angular]AppRoutingModule로 화면 주소 redirect하기 (0) | 2020.10.04 |
[Angular]export해서 import 하는법 (2) | 2020.10.03 |
[Angular]부모의 데이터를 자식에게 넘기기 (0) | 2020.10.03 |
[Angular]자식의 데이터를 부모에게 넘기기 (0) | 2020.10.03 |
Comments, Trackbacks