mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
22 lines
657 B
TypeScript
22 lines
657 B
TypeScript
import 'angular2-universal-polyfills/browser';
|
|
import { enableProdMode } from '@angular/core';
|
|
import { platformUniversalDynamic } from 'angular2-universal';
|
|
import { AppModule } from './app/app.module';
|
|
|
|
// Include styles in the bundle
|
|
import 'bootstrap';
|
|
import './styles/site.css';
|
|
|
|
// Enable either Hot Module Reloading or production mode
|
|
const hotModuleReplacement = module['hot'];
|
|
if (hotModuleReplacement) {
|
|
hotModuleReplacement.accept();
|
|
hotModuleReplacement.dispose(() => { platform.destroy(); });
|
|
} else {
|
|
enableProdMode();
|
|
}
|
|
|
|
// Boot the application
|
|
const platform = platformUniversalDynamic();
|
|
platform.bootstrapModule(AppModule);
|