refactor(upgrade): remove unused variables (#40045)

This commit removes a couple of unused variables.

PR Close #40045
This commit is contained in:
George Kalpakas 2020-12-10 19:13:31 +02:00 committed by Alex Rickabaugh
parent 76e3de253c
commit 61376d5a6e
2 changed files with 94 additions and 98 deletions

View File

@ -505,7 +505,6 @@ export class UpgradeAdapter {
const delayApplyExps: Function[] = [];
let original$applyFn: Function;
let rootScopePrototype: any;
let rootScope: IRootScopeService;
const upgradeAdapter = this;
const ng1Module = this.ng1Module = angularModule(this.idPrefix, modules);
const platformRef = platformBrowserDynamic();
@ -533,7 +532,7 @@ export class UpgradeAdapter {
} else {
throw new Error('Failed to find \'$apply\' on \'$rootScope\'!');
}
return rootScope = rootScopeDelegate;
return rootScopeDelegate;
}
]);
if (ng1Injector.has($$TESTABILITY)) {

View File

@ -170,7 +170,6 @@ export class UpgradeModule {
const INIT_MODULE_NAME = UPGRADE_MODULE_NAME + '.init';
// Create an ng1 module to bootstrap
const initModule =
angularModule(INIT_MODULE_NAME, [])
.constant(UPGRADE_APP_TYPE_KEY, UpgradeAppType.Static)
@ -178,8 +177,7 @@ export class UpgradeModule {
.value(INJECTOR_KEY, this.injector)
.factory(
LAZY_MODULE_REF,
[INJECTOR_KEY, (injector: Injector) => ({injector} as LazyModuleRef)])
LAZY_MODULE_REF, [INJECTOR_KEY, (injector: Injector) => ({injector} as LazyModuleRef)])
.config([
$PROVIDE, $INJECTOR,
@ -253,8 +251,7 @@ export class UpgradeModule {
angularElement(element).data!(controllerKey(INJECTOR_KEY), this.injector);
// 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
// stabilizing
// We need to do this in the next tick so that we don't prevent the bootup stabilizing
setTimeout(() => {
const $rootScope = $injector.get('$rootScope');
const subscription = this.ngZone.onMicrotaskEmpty.subscribe(() => {