What Is Bootstrapping in Angular?
The bootstrapping process sets up the execution environment, digs the App Component out of the App Module’s bootstrap array in its NgModule arguments and creates an instance of the App Component to insert it within the element tag identified by the App Component ’s.selector.
Relevant codes can be found in the entry point of the angular application which is main.ts file in default.
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app.module'; platformBrowserDynamic().bootstrapModule(AppModule);
main.ts is the entry point of your application, compiles the application with and bootstrap the application. The Bootstrap is the root App Component that Angular creates and inserts into the “index.html” host web page. The bootstrapping process creates the components listed in the bootstrap array and inserts each one into the browser (DOM).
Index.html and main.ts files are being created by Angular-CLI on project start and index.html is being edited automatically to inject transpiled main.ts and other relevant files every time you build.