Skip to content

Commit

Permalink
refactor(upgrade): use correct property name (#19180)
Browse files Browse the repository at this point in the history
It doesn't make any difference in this case, because the we only check the
property for truthfulness (and being undefined has the same effect as being set
to false).

PR Close #19180
  • Loading branch information
gkalpak authored and IgorMinar committed Sep 20, 2017
1 parent 9e84719 commit 4586fcc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions packages/upgrade/src/dynamic/upgrade_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as angular from '../common/angular1';
import {$$TESTABILITY, $COMPILE, $INJECTOR, $ROOT_SCOPE, COMPILER_KEY, INJECTOR_KEY, LAZY_MODULE_REF, NG_ZONE_KEY} from '../common/constants';
import {downgradeComponent} from '../common/downgrade_component';
import {downgradeInjectable} from '../common/downgrade_injectable';
import {Deferred, controllerKey, onError} from '../common/util';
import {Deferred, LazyModuleRef, controllerKey, onError} from '../common/util';

import {UpgradeNg1ComponentAdapterBuilder} from './upgrade_ng1_adapter';

Expand Down Expand Up @@ -498,7 +498,10 @@ export class UpgradeAdapter {
ng1Module.factory(INJECTOR_KEY, () => this.moduleRef !.injector.get(Injector))
.factory(
LAZY_MODULE_REF,
[INJECTOR_KEY, (injector: Injector) => ({injector, needsInNgZone: false})])
[
INJECTOR_KEY,
(injector: Injector) => ({ injector, needsNgZone: false } as LazyModuleRef)
])
.constant(NG_ZONE_KEY, this.ngZone)
.factory(COMPILER_KEY, () => this.moduleRef !.injector.get(Compiler))
.config([
Expand Down
7 changes: 5 additions & 2 deletions packages/upgrade/src/static/upgrade_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Injector, NgModule, NgZone, Testability} from '@angular/core';

import * as angular from '../common/angular1';
import {$$TESTABILITY, $DELEGATE, $INJECTOR, $INTERVAL, $PROVIDE, INJECTOR_KEY, LAZY_MODULE_REF, UPGRADE_MODULE_NAME} from '../common/constants';
import {controllerKey} from '../common/util';
import {LazyModuleRef, controllerKey} from '../common/util';

import {angular1Providers, setTempInjectorRef} from './angular1_providers';
import {NgAdapterInjector} from './util';
Expand Down Expand Up @@ -166,7 +166,10 @@ export class UpgradeModule {

.factory(
LAZY_MODULE_REF,
[INJECTOR_KEY, (injector: Injector) => ({injector, needsNgZone: false})])
[
INJECTOR_KEY,
(injector: Injector) => ({ injector, needsNgZone: false } as LazyModuleRef)
])

.config([
$PROVIDE, $INJECTOR,
Expand Down

0 comments on commit 4586fcc

Please sign in to comment.