angularjs - When loading dynamic component using Angular 2 RC6, component life cycle events are not invoked -


when loading component dynamically using following method, constructor said component invoked none of life cycle events (eg. ngafterviewinit or ngoninit).

let component = getcomponent(name); const factory = this.componentfactoryresolver.resolvecomponentfactory(component); this.componentref = this.target.createcomponent(factory); 

is correct implementation rc6, if so, bug?

edit

i have managed fix issue. fyi, how hooked above code parent components life cycle methods.

more information can found here , example of implementation can found here.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -