Reason:
The interpolation directive will do the escaping of any HTML content found in the model in order to prevent HTML injection attacks.
Here is what I got:
<span class="headSpanLink" ng-click="searchCall(m.Id,-1)" ng-bind-html='transform(m.Disc)'></span>
$scope.transform =function(n){
if( n!='undefined' ){
var t = $sce.trustAsHtml(n.split(' ').join("<br>"));
console.log(t);
return t;
}
}
No comments:
Post a Comment