The code:
var appModule = angular.module('lookbookApp',
[
'ngSanitize',
])
appModule.filter('to_trusted', ['$sce', function ($sce) {
return function (text) {
return $sce.trustAsHtml(text);
};
}]);
<div class="text pre-txt" ng-bind-html="caseStudy.Overview | to_trusted"></div>
The content of caseStudy.Overview:
<ul>
<li>aaaa</li>
<li>bbbb</li>
<li>cccc</li>
<li>dddd</li>
</ul>
The expected output:
<ul>
<li>aaaa</li>
<li>bbbb</li>
<li>cccc</li>
<li>dddd</li>
</ul>
I've read articles on internet devoted to this issue, but my unordered list is still displayed as:
aaaa
bbbb
cccc
dddd
How to resolve this issue?
– daan.desmedt Aug 02 '16 at 06:32