import { Component , DynamicComponentLoader , ElementRef , Injector , provide , Type , View } from 'angular2/core' ; Example class ComponentProvider { path : string ; provide : { ( module ) : any ; } ; } export function componentProxyFactory ( provider ) { @ Component ( { selector : 'component-proxy' , providers : [ provide ( ComponentProvider , { useValue : provider } ) ] } ) @ View ( { template : `<span #content></span>` } ) class VirtualComponent { constructor ( el , loader , inj , provider ) { System . import ( provider . path ) . then ( m => { loader . loadIntoLocation ( provider . provide ( m ) , el , 'content' ) ; } ) ; } } return VirtualComponent ; }