fix(upgrade): Ensure upgrade adapter works on angular.js 1.2 (#8647)
This commit is contained in:
parent
420e83a396
commit
cbc8d0adf8
|
@ -319,7 +319,8 @@ export class UpgradeAdapter {
|
|||
.value(NG2_COMPONENT_FACTORY_REF_MAP, componentFactoryRefMap)
|
||||
.config([
|
||||
'$provide',
|
||||
(provide) => {
|
||||
'$injector',
|
||||
(provide, ng1Injector) => {
|
||||
provide.decorator(NG1_ROOT_SCOPE, [
|
||||
'$delegate',
|
||||
function(rootScopeDelegate: angular.IRootScopeService) {
|
||||
|
@ -333,6 +334,7 @@ export class UpgradeAdapter {
|
|||
return rootScope = rootScopeDelegate;
|
||||
}
|
||||
]);
|
||||
if (ng1Injector.has(NG1_TESTABILITY)) {
|
||||
provide.decorator(NG1_TESTABILITY, [
|
||||
'$delegate',
|
||||
function(testabilityDelegate: angular.ITestabilityService) {
|
||||
|
@ -355,6 +357,7 @@ export class UpgradeAdapter {
|
|||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
ng1compilePromise = new Promise((resolve, reject) => {
|
||||
|
|
Loading…
Reference in New Issue