feat(di): change the params of Provider and provide to start with "use"
Closes #4684
This commit is contained in:
@ -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;
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user