In my Angular app, I have some data that I need to include html tags in and I'm having some trouble making sure it gets escaped.
$scope.groups = [
{
'name': 'min',
'item': '<h1>This is some awsome H1</h1><ul><li>yup></li></ul>',
},
{
'name': 'min',
'item': '<h1>This is some awsome H1</h1><ul><li>yup></li></ul>',
},
{
'name': 'min',
'item': '<h1>This is some awsome H1</h1><ul><li>yup></li></ul>',
},
{
'name': 'min',
'item': '<h1>This is some awsome H1</h1><ul><li>yup></li></ul>',
}
];
And here's my html
<div ng-repeat="group in groups">
<li>{{group.name}}</li>
<li>{{group.item}}</li>
</div>
I tried just including some of angular's ng-sanitize, but I've only seen examples where its a single object, and not an array.
I try to add ng-bind-html="groups" to the main div but my data comes out as [object Object].
Any ideas? Any help is appreciated!
ng-bind-html="group.item"on the second<li>?