有人能帮我吗?因为我是rivets.js的新手。我在访问我的html页面中的JSON响应时遇到了问题。我可以使用account.subTotal访问inner 'subTotal‘键,但不能访问货币(内键)等。下面是我的JSON响应:
[
{
"subTotal": [
{
"currency": "dollar",
"balance": "979,18"
}]
,
"productList": [
{
"acctno": "123456789",
"Name": "abc",
}
]
},
{
"subTotal": [
{
"currency": "dollar",
"balance": "979,18"
}]
,
"productList": [
{
"acctno": "123456789",
"Name": "abc",
}
]
},
{
"subTotal": [
{
"currency": "dollar",
"balance": "979,18"
}]
,
"productList": [
{
"acctno": "123456789",
"Name": "abc",
}
]
}]
下面是我如何在HTML模板中添加:
<ul>
<li data-each-account="model">
<a href="#">
<strong data-text="account.subTotal.currency"></strong><br/>
</a>
</li>
</ul> 提前感谢!
发布于 2013-11-09 01:31:02
data-text="account.subTotal || attr currency">https://stackoverflow.com/questions/16777055
复制相似问题