File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
templates/Angular2Spa/ClientApp Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 11import 'angular2-universal-polyfills/browser' ;
2- import 'bootstrap' ;
3- import './styles/site.css' ;
42import { enableProdMode } from '@angular/core' ;
53import { platformUniversalDynamic } from 'angular2-universal' ;
64import { AppModule } from './app/app.module' ;
75
8- enableProdMode ( ) ;
9- platformUniversalDynamic ( ) . bootstrapModule ( AppModule ) ;
6+ // Include styles in the bundle
7+ import 'bootstrap' ;
8+ import './styles/site.css' ;
109
11- // Basic hot reloading support. Automatically reloads and restarts the Angular 2 app each time
12- // you modify source files. This will not preserve any application state other than the URL.
13- declare var module : any ;
14- if ( module . hot ) {
15- module . hot . accept ( ) ;
10+ // Enable either Hot Module Reloading or production mode
11+ const hotModuleReplacement = module [ 'hot' ] ;
12+ if ( hotModuleReplacement ) {
13+ hotModuleReplacement . accept ( ) ;
14+ hotModuleReplacement . dispose ( ( ) => { platform . destroy ( ) ; } ) ;
15+ } else {
16+ enableProdMode ( ) ;
1617}
18+
19+ // Boot the application
20+ const platform = platformUniversalDynamic ( ) ;
21+ platform . bootstrapModule ( AppModule ) ;
You can’t perform that action at this time.
0 commit comments