2

For example if I have data like this in not-working.component.ts

private _data: string = '<a routerLink="/not-working">click here to see it's not working</a>'

and in view not-working.component.jade:

div
  .wrapper([innerHtml]="_data")

so the result will be

div
  .wrapper
    a(routerLink="/not-working")

And the issue here is that routerLink is not rendered as a directive or angular component. Is it possible to render it as a component/directive?

Kelk
  • 63
  • 1
  • 7
  • 4
    I stumbled upon this problematic while trying to add dynamic components to the template. I think it's related. On the fly compilation has been removed from Angular 2 so we're left off with a Dynamic Component implementation. Take a look at these links: http://stackoverflow.com/questions/34784778/equivalent-of-compile-in-angular-2 and http://stackoverflow.com/questions/38888008/how-can-i-use-create-dynamic-template-to-compile-dynamic-component-with-angular – Sebas Dec 18 '16 at 13:42
  • If you think it answers your question I suppose we could mark it as duplicate, or you could remove it. Let me know. – Sebas Dec 18 '16 at 13:43
  • Thanks, it works ;) – Kelk Dec 18 '16 at 17:58

0 Answers0