【发布时间】:2017-05-22 18:34:23
【问题描述】:
我正在使用 ng-bind-html(带有 ngSanitize 模块)在视图中将 html 显示为纯文本。它与作用域变量partyinfo 相关联。
<div class="panel panel-primary" ng-bind-html="partyinfo" contenteditable="false"></div>
如何查看相同的范围变量并在控制器端转换为纯文本?是否有在控制器端执行 ng-bind-html 的等效方法?
感谢您的帮助。
【问题讨论】:
-
convert to plain text on the controller sidedoing ng-bind-html on controller side你要求两件相反的事情,你想做哪一件?
标签: angularjs ng-bind-html ngsanitize