mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
35 lines
881 B
TypeScript
35 lines
881 B
TypeScript
// the polyfills must be the first thing imported
|
|
import 'angular2-universal-polyfills';
|
|
|
|
import 'es6-shim';
|
|
require('zone.js');
|
|
import 'bootstrap';
|
|
import 'reflect-metadata';
|
|
import './styles/site.css';
|
|
|
|
// Angular 2
|
|
import { enableProdMode} from '@angular/core';
|
|
import { platformUniversalDynamic } from 'angular2-universal';
|
|
|
|
// enable prod for faster renders
|
|
enableProdMode();
|
|
|
|
import { MainModule } from './main.browser';
|
|
|
|
const platformRef = platformUniversalDynamic();
|
|
|
|
// on document ready bootstrap Angular 2
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
platformRef.bootstrapModule(MainModule);
|
|
|
|
});
|
|
|
|
|
|
// Basic hot reloading support. Automatically reloads and restarts the Angular 2 app each time
|
|
// you modify source files. This will not preserve any application state other than the URL.
|
|
declare var module: any;
|
|
if (module.hot) {
|
|
module.hot.accept();
|
|
}
|