javascript - AngularJS - Render HTML tags that are contained in a string -


my database stores product information, , lot of organised lists. load data angular $scope.post.

for instance,

$scope.post.size_description = '<li> fits true size. take normal size\r</li>    <li> slim-cut, mid-rise style</li>    <li> long in length, alter fit</li>    <li> model wears 48\r</li>    <li> model measures: waist size 32, height 6\'1"/ 185cm\r</li>'. 

when try load data angular app, gets rendered text (i.e. <li> not parsed). understand happens security reasons, there way around it?

as damax has said here: https://stackoverflow.com/a/11640420/769083

<div ng-bind-html-unsafe="post.size_description"></div> 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -