chore(router): use new provide API in examples

This commit is contained in:
Brian Ford 2015-10-28 03:50:29 +00:00
parent 6b40293c0a
commit cc37d0a7fa
5 changed files with 17 additions and 15 deletions

View File

@ -1,4 +1,4 @@
import {bootstrap, bind, Component} from 'angular2/angular2';
import {bootstrap, provide, Component} from 'angular2/angular2';
import {
CanActivate,
RouteConfig,
@ -51,6 +51,6 @@ class AppCmp {
export function main() {
return bootstrap(AppCmp,
[bind(APP_BASE_HREF).toValue('/angular2/examples/router/ts/can_activate')]);
return bootstrap(
AppCmp, [provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/can_activate'})]);
}

View File

@ -1,4 +1,4 @@
import {bind, bootstrap, Component} from 'angular2/angular2';
import {provide, bootstrap, Component} from 'angular2/angular2';
import {
CanDeactivate,
RouteConfig,
@ -61,6 +61,6 @@ class AppCmp {
export function main() {
return bootstrap(AppCmp,
[bind(APP_BASE_HREF).toValue('/angular2/examples/router/ts/can_deactivate')]);
return bootstrap(
AppCmp, [provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/can_deactivate'})]);
}

View File

@ -1,4 +1,4 @@
import {Component, bind, bootstrap} from 'angular2/angular2';
import {Component, provide, bootstrap} from 'angular2/angular2';
import {
OnActivate,
ComponentInstruction,
@ -41,6 +41,6 @@ class AppCmp {
export function main() {
return bootstrap(AppCmp,
[bind(APP_BASE_HREF).toValue('/angular2/examples/router/ts/on_activate')]);
return bootstrap(
AppCmp, [provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_activate'})]);
}

View File

@ -1,4 +1,4 @@
import {Component, Injectable, NgFor, bind, bootstrap} from 'angular2/angular2';
import {Component, Injectable, NgFor, provide, bootstrap} from 'angular2/angular2';
import {
OnDeactivate,
ComponentInstruction,
@ -55,7 +55,8 @@ class AppCmp {
export function main() {
return bootstrap(
AppCmp,
[bind(APP_BASE_HREF).toValue('/angular2/examples/router/ts/on_deactivate'), LogService]);
return bootstrap(AppCmp, [
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}),
LogService
]);
}

View File

@ -1,4 +1,4 @@
import {bootstrap, Component, bind} from 'angular2/angular2';
import {bootstrap, Component, provide} from 'angular2/angular2';
import {
CanActivate,
RouteConfig,
@ -52,5 +52,6 @@ class AppCmp {
export function main() {
return bootstrap(AppCmp, [bind(APP_BASE_HREF).toValue('/angular2/examples/router/ts/reuse')]);
return bootstrap(AppCmp,
[provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/reuse'})]);
}