Json 聚合物与玉石

Json 聚合物与玉石,json,pug,polymer,Json,Pug,Polymer,我的聚合物元素如下所示: polymer elementattributes='device'名称='html-404' 当我在jade中声明属性时: link(rel='import', href='src/html-404.html') section html-404(device ='#{device}') 我的HTML是这样得到的: '<html-404 device="[Object Object]">' 我不能使用代码中的数据 装置 { 设备:{ 马

我的聚合物元素如下所示: polymer elementattributes='device'名称='html-404'

当我在jade中声明属性时:

  link(rel='import', href='src/html-404.html')
  section
    html-404(device ='#{device}')
我的HTML是这样得到的:

'<html-404 device="[Object Object]">'
我不能使用代码中的数据

装置

{ 设备:{ 马卡:三星, 设备:telefono }
}尝试将其字符串化为JSON:

html-404(device=JSON.stringify(device))

设备应该是什么?设备是一个json对象,一个变量,我需要使用模板进行数据绑定,并在我的元素polymer中使用它,比如{device.brand}}谢谢,但这不起作用