angularjs解决方案之 Error: [$sce:unsafe]
angularjs中无法直接使用ng-bind-html:
<divng-bind-html="item.text|highlight:$select.search"></div>
1.app.js中添加
angular.module('epcui',['ngSanitize'//ngSanitize])
2.html中添加sanitize
<scriptsrc="js/angular/angular-sanitize.js"></script>
借鉴:http://www.cnblogs.com/yshyee/p/4272180.html
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。