mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 19:17:30 +00:00
chore(ng2-template): upgrade angular 2 template to rc1 version
This commit is contained in:
committed by
SteveSandersonMS
parent
8005427d94
commit
58a1aa3538
@@ -1,6 +1,6 @@
|
||||
import 'angular2-universal/polyfills';
|
||||
import * as ngCore from 'angular2/core';
|
||||
import * as ngRouter from 'angular2/router';
|
||||
import * as ngCore from '@angular/core';
|
||||
import * as ngRouter from '@angular/router-deprecated';
|
||||
import * as ngUniversal from 'angular2-universal';
|
||||
import { BASE_URL, ORIGIN_URL, REQUEST_URL } from 'angular2-universal/common';
|
||||
import { App } from './components/app/app';
|
||||
@@ -10,13 +10,14 @@ export default function (params: any): Promise<{ html: string, globals?: any }>
|
||||
ngCore.provide(BASE_URL, { useValue: '/' }),
|
||||
ngCore.provide(ORIGIN_URL, { useValue: params.origin }),
|
||||
ngCore.provide(REQUEST_URL, { useValue: params.url }),
|
||||
ngUniversal.NODE_HTTP_PROVIDERS,
|
||||
ngUniversal.NODE_ROUTER_PROVIDERS
|
||||
...ngUniversal.NODE_PLATFORM_PIPES,
|
||||
...ngUniversal.NODE_ROUTER_PROVIDERS,
|
||||
...ngUniversal.NODE_HTTP_PROVIDERS,
|
||||
];
|
||||
|
||||
return ngUniversal.bootloader({
|
||||
directives: [App],
|
||||
providers: serverBindings,
|
||||
componentProviders: serverBindings,
|
||||
async: true,
|
||||
preboot: false,
|
||||
// TODO: Render just the <app> component instead of wrapping it inside an extra HTML document
|
||||
|
||||
Reference in New Issue
Block a user