比如
js:
var SomeController = function () {
this.customHtml = '<ul><li>render</li></ul>';
}
html:
<p ng:bind="customHtml"></p>
result:
<p>
"<ul><li>render</li></ul>"
</p>
这样就变成字符串了。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
angular1.2使用
1.3用
不过现在需要ngSanitize模块
ngSanitize模块很强大,用sce还可以做unicode转码输出到界面