小编tim*_*aak的帖子

如何使用$ sce.trustAsHtml(字符串)在Angular 1.2+中复制ng-bind-html-unsafe

ng-bind-html-unsafe 已在Angular 1.2中删除

我正在尝试实现我需要使用的东西ng-bind-html-unsafe.在文档和github提交中,他们说:

当绑定到$ sce.trustAsHtml(string)的结果时,ng-bind-html提供ng-html-bind-unsafe like行为(innerHTML是没有清理的结果).

你怎么做到这一点?

angularjs

224
推荐指数
5
解决办法
22万
查看次数

标签 统计

angularjs ×1