Wednesday, 11 September 2013

Rendering html in Angular with Directive

Rendering html in Angular with Directive

I am storing html data in my database from the output of a WYSIWYG editor.
The html also stores the html for some directives. One of them being the
ui-bootstrap tooltip:
<span tooltip-placement="left" tooltip="On the Left!">Tooltip text
here</span>
I am able to get any other html elements to work by using the binding:
<div ng-bind-html-unsafe="html.content"></div>
But the html with the directive's reference doesn't interact with the
actual directive.
How can I get the directive to work?
Do I have to compile the html or something like that?

No comments:

Post a Comment