【发布时间】:2017-11-06 22:23:28
【问题描述】:
我在以 HTML 格式打印 JSON 数据时遇到问题
var a = "We are the world.\n \tWelcome to our place.";
假设我有来自后端的这个 json 数据,我想打印出这样的东西。
<div>
We are the world.
Welcome to our place.
</div>
我尝试过使用 ng-bind-html,但它显示所有字符串内联。
谢谢。
【问题讨论】:
标签: javascript html angularjs json angular-ui