Bootstrapping Angular Application
- Then entry point to every Angular application is the main.ts file which contains this last line:
- The bootstrapModule() function helps bootstrap our root module taking in the root module as its argument.
- AppModule is our root module which is the entry module for our application, this can actually be any of the modules in our application but by convention AppModule is used as the root module.
- In our AppModule, we then need to specify the component that will serve as the entry point component for our application. This happens in our app.module.ts file where we import the entry component (conventionally AppComponent) and supply it as the only item in our bootstrap array inside the NgModule configuration object.
To put it short
- platformBrowserDynamic() to determine the Broswer or platform in which your angular app is about to run
- bootstrapModule() function to boot your entry module(app.module.ts) by supplying the module as an argument.
- app.module.ts is the root module that would specify the entry point component in the module configuration object.
How angular Works Internally