bootstrap: [AppComponent]
은 Angular 애플리케이션 모듈에서 사용되는 중요한 부분입니다. 이 부분은 Angular의 모듈 구성에서 어플리케이션의 시작점이 되는 컴포넌트를 정의합니다.
// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
],
bootstrap: [AppComponent]
})
export class AppModule { }
bootstrap: [AppComponent]
는 Angular 애플리케이션 모듈에서 AppComponent가 애플리케이션의 시작 지점이라는 것을 나타냅니다. AppComponent는 일반적으로 루트 컴포넌트로, 이 컴포넌트에서 모든 다른 컴포넌트들이 나타납니다.
이것은 Angular에게 AppModule이 로드될 때 AppComponent를 애플리케이션의 시작점으로 사용하도록 지시하는 것입니다. Angular는 AppModule을 시작할 때 AppComponent를 렌더링하고 화면에 표시하는 데 사용합니다.
즉, bootstrap: [AppComponent]
는 Angular가 AppComponent를 애플리케이션의 시작점으로 인식하고 애플리케이션을 렌더링할 때 AppComponent를 사용한다는 것을 의미합니다.