I used to have a bootstrap call in main.ts, for example:
bootstrap(AppComponent, [
APP_ROUTER_PROVIDERS,
HTTP_PROVIDERS,
disableDeprecatedForms(),
provideForms(),
{
provide: PLATFORM_DIRECTIVES, multi: true, useValue: MATERIAL_DIRECTIVES
}
])
In short, Angular rc.4 -> rc.5 migration guide offers a new way to download the application, i.e. bootstrapModulewhich initializes the root module:
platformBrowserDynamic().bootstrapModule(
AppModule
)
Question:
How to pass obsolete / user directives and providers when used bootstrapModuleinstead of an older call bootstrap?
My guess:
These providers and directives should be included somewhere within app.module.ts, but how exactly will we wrap these directives and providers using the module, is it not clear to me?
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
FormsModule,
RouterModule,
],
bootstrap: [AppComponent],
})
export class AppModule {}