diff --git a/aio/src/app/app.module.ts b/aio/src/app/app.module.ts index b5b57dd261..8f597a46c0 100644 --- a/aio/src/app/app.module.ts +++ b/aio/src/app/app.module.ts @@ -132,7 +132,7 @@ export const svgIconProviders = [ @NgModule({ imports: [ - BrowserModule, + BrowserModule.withServerTransition({appId: 'ng-docs'}), BrowserAnimationsModule, CustomElementsModule, HttpClientModule, diff --git a/aio/src/main.ts b/aio/src/main.ts index dc96f6ad56..00ca40d010 100644 --- a/aio/src/main.ts +++ b/aio/src/main.ts @@ -8,5 +8,7 @@ if (environment.production) { enableProdMode(); } -platformBrowserDynamic().bootstrapModule(AppModule); - +document.addEventListener('DOMContentLoaded', () => { + platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); +});