TjWallas / angular-bind-html-compile

Directive that calls $compile on trusted HTML, allowing directives in an API response.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bind-html-compile allows for HTML containing directives to be compiled.

You should only use this directive where the content is coming from a trusted source.

ng-bind-html:

<div ng-bind-html="data.content"></div>

If the data.content contained a directive, it would not be compiled.

bind-html-compile:

<div bind-html-compile="data.content"></div>

About

Directive that calls $compile on trusted HTML, allowing directives in an API response.

License:MIT License