Add server-side prerendering for Angular 2 template

This commit is contained in:
SteveSandersonMS
2016-02-29 19:29:04 +00:00
parent 6d2e51bf63
commit 47ba251923
13 changed files with 50 additions and 134 deletions

View File

@@ -0,0 +1,16 @@
import 'bootstrap/dist/css/bootstrap.css';
import { bootstrap } from 'angular2/platform/browser';
import { FormBuilder } from 'angular2/common';
import * as router from 'angular2/router';
import { Http, HTTP_PROVIDERS } from 'angular2/http';
import { App } from './components/app/app';
bootstrap(App, [router.ROUTER_BINDINGS, HTTP_PROVIDERS, FormBuilder]);
// 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();
}