1
我能够在其他地方做类似的事情,但不能使用复选框。我在这里错过了什么?从json与Angular1填充(使用角度材质)
我的JSON是这样的:
{
"data": [
{
"id": 1,
"tags": [
"tag1",
"tag2"
],
...a bunch of other stuff...
},
{
"id": 2,
"tags": [
"tag1",
"tag2",
"tag3",
"tag4"
],
...a bunch of other stuff...
}
]
}
而我的HTML(角)是这样的:
<div ng-repeat="tag in ::vm.media.tags track by $index">
<md-checkbox >
{{tag.tags}}
</md-checkbox>
</div>
我有一个很难得到标签的实际文本或姓名显示在复选框旁边。所有我得到的是单独的复选框作为图像显示下方
在此先感谢
它工作正常。 http://codepen.io/next1/pen/YNMLjd – nextt1
不完全。每个标签都是自己的支票簿。这就是为什么我的代码中的ng重复不同于您想为数据中的每个标记复选框的 – LOTUSMS
? – nextt1