Angular Bootstrapping and Modularity
Bootstrapping an Angular Application
Bootstrapping in Angular is referred to as the process of initializing the Angular application during setup. The initialization process involves reading the HTML within the root and compiling it in an internal representation. This initializing process takes place in the app.module.js file (a pre-existing file in default Angular projects) in Angular. In the file, there is an NgModule decorator (this exists by default) that describes how the application's parts fit together. To understand bootstrapping, we will look at the implementation on the default Angular CLI application. First, let's open the appModule and view its components, as shown in the following snippet:
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; /* the AppModule class with the @NgModule decorator */ @NgModule({ declarations: [ AppComponent ...