Skip to content

Commit f16f4c8

Browse files
chore(lazyLoad): Allow lazy loading child module even if there is no root module (for ng1-to-ng2)
Closes ui-router/angular-hybrid#32
1 parent c7e1001 commit f16f4c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lazyLoad/lazyLoadNgModule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export function applyNgModule(transition: Transition, ng2Module: NgModuleRef<any
190190
* @internalapi
191191
*/
192192
export function multiProviderParentChildDelta(parent: Injector, child: Injector, token: any) {
193-
let childVals: RootModule[] = child.get(token);
194-
let parentVals: RootModule[] = parent.get(token);
193+
let childVals: RootModule[] = child.get(token, []);
194+
let parentVals: RootModule[] = parent.get(token, []);
195195
return childVals.filter(val => parentVals.indexOf(val) === -1);
196196
}

0 commit comments

Comments
 (0)