Ian McNally

Sanitizing HTML in Angular

October 07, 2014

If your Angular app is pulling down a string of HTML to display, and you want to use it as a model:

<li ng-bind-html="someHtml"></li>

Then use angular-sanitize. It’ll clean up your HTML for you.

Ian McNally

Hey, I'm Ian. I build websites and write about what I learn as I go. Follow me on Twitter.