封装成过滤器只是为了方便使用
app.filter('to_trusted', ['$sce', function ($sce) {
return function (text) {
return $sce.trustAsHtml(text);
};
}]);
html code:
<p ng-bind-html="currentWork.description | to_trusted"></p>
封装成过滤器只是为了方便使用
app.filter('to_trusted', ['$sce', function ($sce) {
return function (text) {
return $sce.trustAsHtml(text);
};
}]);
html code:
<p ng-bind-html="currentWork.description | to_trusted"></p>
© 著作权归作者所有