Improve this Doc View Source ngBindHtml
- directive in module ng
Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default, the resulting HTML content will be sanitized using the $sanitize service. To utilize this functionality, ensure that
$sanitize is available, for example, by including
ngSanitize in your module's dependencies (not in core Angular). In order to use
ngSanitize in your module's dependencies, you need to include "angular-sanitize.js" in your application.
Note: If a
$sanitize service is unavailable and the bound value isn't explicitly trusted, you will have an exception (instead of an exploit.)
- This directive executes at priority level 0.
- as attribute:
<ANY ng-bind-html="expression"> ... </ANY>
|ngBindHtml|| || |
Expression to evaluate.
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.