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

@ -40,7 +40,7 @@ export class Ng2ComponentFacade {
bootstrapNg2() {
var childInjector = this.parentInjector.resolveAndCreateChild(
[provide(NG1_SCOPE, {asValue: this.componentScope})]);
[provide(NG1_SCOPE, {useValue: this.componentScope})]);
this.hostViewRef =
this.viewManager.createRootHostView(this.protoView, '#' + this.id, childInjector);
var renderer: any = (<any>this.hostViewRef).render;

View File

@ -73,8 +73,8 @@ export class UpgradeModule {
applicationCommonBindings(),
applicationDomBindings(),
compilerProviders(),
provide(NG1_INJECTOR, {asFactory: () => ng1Injector}),
provide(NG1_COMPILE, {asFactory: () => ng1Injector.get(NG1_COMPILE)})
provide(NG1_INJECTOR, {useFactory: () => ng1Injector}),
provide(NG1_COMPILE, {useFactory: () => ng1Injector.get(NG1_COMPILE)})
];
var platformRef: PlatformRef = platform();