Complete the code to import the core Angular module.
import { [1] } from '@angular/core';
The NgModule decorator is imported from '@angular/core' to define Angular modules.
Complete the code to declare the root component in the module.
@NgModule({
declarations: [[1]],
imports: [],
bootstrap: []
})
export class AppModule {}The root component AppComponent must be declared in the declarations array of the root module.
Fix the error in the bootstrap array to start the app with the root component.
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
bootstrap: [[1]]
})
export class AppModule {}The bootstrap array must contain the root component AppComponent to launch the app.
Fill both blanks to import BrowserModule and declare AppComponent correctly.
import { NgModule } from '@angular/core'; import { [1] } from '@angular/platform-browser'; import { [2] } from './app.component'; @NgModule({ declarations: [AppComponent], imports: [BrowserModule], bootstrap: [AppComponent] }) export class AppModule {}
BrowserModule is imported from '@angular/platform-browser' to enable browser features.
AppComponent is imported from the local file './app.component' to declare the root component.
Fill all three blanks to complete the root module with declarations, imports, and bootstrap arrays.
@NgModule({
declarations: [[1]],
imports: [[2]],
bootstrap: [[3]]
})
export class AppModule {}The declarations array must include AppComponent to declare the root component.
The imports array must include BrowserModule to enable browser features.
The bootstrap array must include AppComponent to start the app with the root component.