Angular富文本頁面展示

過濾器: app.filter('showAsHtml',function ($sce) { return function (input) { return $sce.trustAsHtml(input); } }) 使用$sce的理由: angularjs中綁定的數據有html標籤時,如<h1>,會被angularjs認爲是不安全的而自動過濾掉,爲了保留這些標籤
相關文章
相關標籤/搜索