File tree Expand file tree Collapse file tree 2 files changed +3
-44
lines changed Expand file tree Collapse file tree 2 files changed +3
-44
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ import {
3333 ViewContext ,
3434} from '@uirouter/core' ;
3535import { Ng2ViewConfig } from '../statebuilders/views' ;
36- import { MergeInjector } from '../mergeInjector' ;
3736
3837/** @hidden */
3938let id = 0 ;
@@ -291,7 +290,8 @@ export class UIView implements OnInit, OnDestroy {
291290 const componentClass = config . viewDecl . component ;
292291
293292 // Create the component
294- const compFactoryResolver = componentInjector . get ( ComponentFactoryResolver ) ;
293+ const moduleInjector = context . getResolvable ( NATIVE_INJECTOR_TOKEN ) . data ;
294+ const compFactoryResolver = moduleInjector . get ( ComponentFactoryResolver ) ;
295295 const compFactory = compFactoryResolver . resolveComponentFactory ( componentClass ) ;
296296 this . _componentRef = this . _componentTarget . createComponent ( compFactory , undefined , componentInjector ) ;
297297
@@ -322,10 +322,8 @@ export class UIView implements OnInit, OnDestroy {
322322 newProviders . push ( { provide : UIView . PARENT_INJECT , useValue : parentInject } ) ;
323323
324324 const parentComponentInjector = this . viewContainerRef . injector ;
325- const moduleInjector = context . getResolvable ( NATIVE_INJECTOR_TOKEN ) . data ;
326- const mergedParentInjector = new MergeInjector ( moduleInjector , parentComponentInjector ) ;
327325
328- return ReflectiveInjector . resolveAndCreate ( newProviders , mergedParentInjector ) ;
326+ return Injector . create ( { providers : newProviders , parent : parentComponentInjector } ) ;
329327 }
330328
331329 /**
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments