@ -20,7 +20,7 @@ import {
|
||||
import {NumberWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {PromiseWrapper} from 'angular2/src/core/facade/async';
|
||||
|
||||
import {bind, Component, DirectiveResolver, View} from 'angular2/core';
|
||||
import {provide, Component, DirectiveResolver, View} from 'angular2/core';
|
||||
|
||||
import {SpyLocation} from 'angular2/src/mock/location_mock';
|
||||
import {
|
||||
@ -48,10 +48,13 @@ export function main() {
|
||||
beforeEachBindings(() => [
|
||||
RouteRegistry,
|
||||
DirectiveResolver,
|
||||
bind(Location).toClass(SpyLocation),
|
||||
bind(Router)
|
||||
.toFactory((registry, location) => { return new RootRouter(registry, location, MyComp); },
|
||||
[RouteRegistry, Location])
|
||||
provide(Location, {asClass: SpyLocation}),
|
||||
provide(Router,
|
||||
{
|
||||
asFactory:
|
||||
(registry, location) => { return new RootRouter(registry, location, MyComp); },
|
||||
deps: [RouteRegistry, Location]
|
||||
})
|
||||
]);
|
||||
|
||||
beforeEach(inject([TestComponentBuilder, Router, Location], (tcBuilder, rtr, loc) => {
|
||||
|
Reference in New Issue
Block a user