AngularJS: How do I render HTML in an ng-repeat?

Rendering HTML with Angular should be a simple task - ng-bind-html should do the trick. (see here).

However, I was struggling to do the same thing in an 'ng-repeat'. I tried using $sanitize, but that did not work. Eventually, I found the solution on stackoverflow: instead of having the iteration sitting above the rendering, one can consolidate the two to produce the required result.

So
                <span ng-repeat="item in items" me-update-flexslider="y">
   <span class="ng-bind-html:{{item}}"></span>
                </span>
became

                <span ng:repeat="item in items" ng-bind-html="item"></span>

Comments

Popular posts from this blog

SharePoint 2013: Error updating managed account credentials

Error deploying Nintex workflow: An item with the same key has already been added