AppModuleoperates as the root module of our application. The module is configured to use
AppComponentas the component to bootstrap, and will be rendered on any
app-rootHTML element encountered.
appHTML element in the index.html file, and we use app/main.ts to import the
AppModulecomponent and the
platformBrowserDynamic().bootstrapModulefunction and kickstart the process. As shown above, you may optionally use AoT in which case you will be working with Factories, in the example,
bootstrapcall), easier to reuse and gives better organization and structure to our application.
@NgModulewhich will be covered later, but for now this is enough to get started.