errorcode errorcode - 4 months ago 50
AngularJS Question

HTML text in ionic list

i have following list:

<ion-item ng-repeat="item in productlistitems">
{{ }}!
</ion-list> is with HTML tags, but they appear as plain text.

How can I achieve that the HTML code gets "executed"?


In order to render HTML, use the "ng-bind-html" directive like this:

<div ng-bind-html=""></div>

In your controller, you need to "trust" the data using the $sce service like this:

$ = $sce.trustAsHtml("your HTML here");