Simplify Angular 2 template where possible

This commit is contained in:
SteveSandersonMS
2016-09-19 12:44:25 +01:00
parent 243a9b4ef6
commit 8f550c5706
20 changed files with 77 additions and 252 deletions

View File

@@ -1,30 +1,15 @@
// the polyfills must be the first thing imported
import 'angular2-universal-polyfills';
import 'es6-shim';
require('zone.js');
import 'zone.js';
import 'bootstrap';
import 'reflect-metadata';
import './styles/site.css';
// Angular 2
import { enableProdMode} from '@angular/core';
import { platformUniversalDynamic } from 'angular2-universal';
import { AppModule } from './app/app.module';
// 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);
});
platformUniversalDynamic().bootstrapModule(AppModule);
// 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.