[英]JADE render angular scope var with HTML and JSON in
I have a angualrjs var which is HTML with JSON, it basically read from the database. 我有一个angualrjs var,它是带有JSON的HTML,它基本上是从数据库中读取的。
The var is var是
<div id='tes-34ncd' class='classname'><span class='classname-data' title='{"id":"34f3fgg","server":"www.example.com","geometry":{"width":470,"height":"infinite"},"configuration":{"newEntryLocation":"top","commentLocation":"top","replayContentOrder":"chronological","pinsGrowSize":"on","titlePage":"off","skinOverride":"117"}}'> </span></div>
Now if I just use {{ varname }} it shows the html with tags, it doesn't properly render it 现在,如果我仅使用{{varname}},它将显示带有标签的html,则无法正确呈现它
I have tried with != and ! 我已经尝试过!=和! and = and no luck
和=而且没有运气
My Nodejs server is: 我的Nodejs服务器是:
app.configure(function(){
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.set('view options', {
layout: false
});
app.use( express.cookieParser() );
app.use(express.favicon());
app.use(express.json());
app.use(express.urlencoded());
app.use(express.methodOverride());
app.use(express.static(__dirname + '/public'));
app.use(app.router);
});
Does anyone know how to render it properly? 有谁知道如何正确渲染它?
I can't comment but have you checked this possible duplicate out? 我无法发表评论,但您是否已检查过此重复项?
How to make Jade stop HTML encoding element attributes, and produce a literal string value? 如何使Jade停止HTML编码元素属性,并产生文字字符串值?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.