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
Post a Comment