Angular富文本页面展示

过滤器: app.filter('showAsHtml',function ($sce) { return function (input) { return $sce.trustAsHtml(input); } }) 使用$sce的理由: angularjs中绑定的数据有html标签时,如<h1>,会被angularjs认为是不安全的而自动过滤掉,为了保留这些标签
相关文章
相关标签/搜索