feat(di): change the params of Provider and provide to start with "use"

Closes #4684
This commit is contained in:
vsavkin
2015-10-12 11:30:34 -07:00
committed by Victor Savkin
parent f443ecbfa6
commit 1aeafd31bd
110 changed files with 466 additions and 434 deletions

View File

@ -111,17 +111,17 @@ export const ROUTER_DIRECTIVES: any[] = CONST_EXPR([RouterOutlet, RouterLink]);
*/
export const ROUTER_PROVIDERS: any[] = CONST_EXPR([
RouteRegistry,
CONST_EXPR(new Provider(LocationStrategy, {toClass: PathLocationStrategy})),
CONST_EXPR(new Provider(LocationStrategy, {useClass: PathLocationStrategy})),
Location,
CONST_EXPR(
new Provider(Router,
{
toFactory: routerFactory,
useFactory: routerFactory,
deps: CONST_EXPR([RouteRegistry, Location, ROUTER_PRIMARY_COMPONENT])
})),
CONST_EXPR(new Provider(
ROUTER_PRIMARY_COMPONENT,
{toFactory: routerPrimaryComponentFactory, deps: CONST_EXPR([ApplicationRef])}))
{useFactory: routerPrimaryComponentFactory, deps: CONST_EXPR([ApplicationRef])}))
]);
/**