refactor(upgrade): remove unused variables (#40045)
This commit removes a couple of unused variables. PR Close #40045
This commit is contained in:
parent
76e3de253c
commit
61376d5a6e
@ -505,7 +505,6 @@ export class UpgradeAdapter {
|
|||||||
const delayApplyExps: Function[] = [];
|
const delayApplyExps: Function[] = [];
|
||||||
let original$applyFn: Function;
|
let original$applyFn: Function;
|
||||||
let rootScopePrototype: any;
|
let rootScopePrototype: any;
|
||||||
let rootScope: IRootScopeService;
|
|
||||||
const upgradeAdapter = this;
|
const upgradeAdapter = this;
|
||||||
const ng1Module = this.ng1Module = angularModule(this.idPrefix, modules);
|
const ng1Module = this.ng1Module = angularModule(this.idPrefix, modules);
|
||||||
const platformRef = platformBrowserDynamic();
|
const platformRef = platformBrowserDynamic();
|
||||||
@ -533,7 +532,7 @@ export class UpgradeAdapter {
|
|||||||
} else {
|
} else {
|
||||||
throw new Error('Failed to find \'$apply\' on \'$rootScope\'!');
|
throw new Error('Failed to find \'$apply\' on \'$rootScope\'!');
|
||||||
}
|
}
|
||||||
return rootScope = rootScopeDelegate;
|
return rootScopeDelegate;
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
if (ng1Injector.has($$TESTABILITY)) {
|
if (ng1Injector.has($$TESTABILITY)) {
|
||||||
|
@ -170,7 +170,6 @@ export class UpgradeModule {
|
|||||||
const INIT_MODULE_NAME = UPGRADE_MODULE_NAME + '.init';
|
const INIT_MODULE_NAME = UPGRADE_MODULE_NAME + '.init';
|
||||||
|
|
||||||
// Create an ng1 module to bootstrap
|
// Create an ng1 module to bootstrap
|
||||||
const initModule =
|
|
||||||
angularModule(INIT_MODULE_NAME, [])
|
angularModule(INIT_MODULE_NAME, [])
|
||||||
|
|
||||||
.constant(UPGRADE_APP_TYPE_KEY, UpgradeAppType.Static)
|
.constant(UPGRADE_APP_TYPE_KEY, UpgradeAppType.Static)
|
||||||
@ -178,8 +177,7 @@ export class UpgradeModule {
|
|||||||
.value(INJECTOR_KEY, this.injector)
|
.value(INJECTOR_KEY, this.injector)
|
||||||
|
|
||||||
.factory(
|
.factory(
|
||||||
LAZY_MODULE_REF,
|
LAZY_MODULE_REF, [INJECTOR_KEY, (injector: Injector) => ({injector} as LazyModuleRef)])
|
||||||
[INJECTOR_KEY, (injector: Injector) => ({injector} as LazyModuleRef)])
|
|
||||||
|
|
||||||
.config([
|
.config([
|
||||||
$PROVIDE, $INJECTOR,
|
$PROVIDE, $INJECTOR,
|
||||||
@ -253,8 +251,7 @@ export class UpgradeModule {
|
|||||||
angularElement(element).data!(controllerKey(INJECTOR_KEY), this.injector);
|
angularElement(element).data!(controllerKey(INJECTOR_KEY), this.injector);
|
||||||
|
|
||||||
// Wire up the ng1 rootScope to run a digest cycle whenever the zone settles
|
// Wire up the ng1 rootScope to run a digest cycle whenever the zone settles
|
||||||
// We need to do this in the next tick so that we don't prevent the bootup
|
// We need to do this in the next tick so that we don't prevent the bootup stabilizing
|
||||||
// stabilizing
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const $rootScope = $injector.get('$rootScope');
|
const $rootScope = $injector.get('$rootScope');
|
||||||
const subscription = this.ngZone.onMicrotaskEmpty.subscribe(() => {
|
const subscription = this.ngZone.onMicrotaskEmpty.subscribe(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user