参考链接
https://docs.angularjs.org/api/ngSanitize
首先下载angular-sanitize.min.js,下载地址:
https://github.com/angular/bower-angular-sanitize
添加解析函数
//解析html字符串
$scope.deliberatelyTrustDangerousSnippet = function(content) {
return $sce.trustAsHtml(content);
};
使用ng-bind-html配合函数进行解析
<div class="content"
ng-bind-html="deliberatelyTrustDangerousSnippet(que.content)">
</div>