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

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -