I'm having a component that makes an http request in its ngOnInit
function. This call retrieves the content of the page that can contains angular directives such as routerLink
or even angular2 custom component.
I found the way to inject this content in a div
(using the innerHTML
property), however, the inserted content does not get compiled by "angular2" resulting in routerLink
being just an attribute without effect. And of course, the components don't appear.
Is there a simple way to ask angular2 to compile the inserted HTML?