I want to use the limitTo
filter in my angularJs application.
I have a div which displays a parsed html code as following :
<div ng-bind-html="o.description | filter:unsafe | filter:limitTo:50"></div>
but the limitTo
filter didn't work.
How can I solve this problem ?
Edit :
due to @hadiJZ response I changed my div to this :
but still it doesn't work, when I tried to apply the limitTo filter on another div it worked, and this is an example :
<a href="#/offres/{{o.codeOffre}}">{{o.titre | limitTo:2}}</a>
the unsafe
filter :
myApp.filter('unsafe', function($sce) {
return function(val) {
return $sce.trustAsHtml(val);
};
});