当后台获取内容有标签时如何过滤---angular

$sce

controller中注入$sce服务;

假设将获取到的标签内容为result;

$scope.result = $sce.trustAsHtml(result);

在html页面中则<span ng-bind-html='result'></span>

posted @ 2017-07-06 14:56  peiyao  阅读(262)  评论(0)    收藏  举报