chore(router): use new provide API in examples
This commit is contained in:
parent
6b40293c0a
commit
cc37d0a7fa
|
@ -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'})]);
|
||||
}
|
||||
|
|
|
@ -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'})]);
|
||||
}
|
||||
|
|
|
@ -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'})]);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -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'})]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue