import { Injector , Type } from '@angular/core' ; import { POLYMORPHEUS_CONTEXT } from '../tokens/context' ; /**
 * Wrapper class for a component that will be used as content for  PolymorpheusOutletDirective param component param injector — optional  Injector for lazy loaded module case
  export class PolymorpheusComponent < T extends object , C extends object > { constructor ( readonly component , private readonly injector = null ) { } createInjector ( injector , context ) { return Injector . create ( { parent : this . injector || injector , providers : [ { provide : POLYMORPHEUS_CONTEXT , useValue : context , } , ] , } ) ; } }