我的聚合物元素如下: 聚合物元素(属性='设备'名称=' html-404')
当我在jade中声明属性时:
link(rel='import', href='src/html-404.html')
section
html-404(device ='#{device}')
我以这种方式得到了我的HTML:
'<html-404 device="[Object Object]">'
我无法使用代码中的数据。
设备
{ &#34;设备&#34;:{ &#34;马卡&#34; :&#34;三星&#34;, &#34;装置&#34; :&#34; telefono&#34; } }
答案 0 :(得分:0)
尝试将其字符串化为JSON:
html-404(device=JSON.stringify(device))