Angularjs怎么实现查询数组里符合要求的数据,并把这些数据输入指定的标签内?
$scope.images=[{"imae":"img/178.jpg","description":"Image01description","id":"0"},{"i...
$scope.images = [
{"imae":"img/178.jpg", "description":"Image 01 description","id":"0"},
{"imae":"img/178.jpg", "description":"Image 02 description","id":"0"},
{"imae":"img/178.jpg", "description":"Image 03 description","id":"1"},
{"imae":"img/178.jpg", "description":"Image 04 description","id":"1"},
{"imae":"img/178.jpg", "description":"Image 05 description","id":"1"}
];
这里有个数组,使用angularjs如何将id=0的两组数据写入到下面的html标签里呢?
<img ng-src="{{imae}}" slt="{{description}}“/> 展开
{"imae":"img/178.jpg", "description":"Image 01 description","id":"0"},
{"imae":"img/178.jpg", "description":"Image 02 description","id":"0"},
{"imae":"img/178.jpg", "description":"Image 03 description","id":"1"},
{"imae":"img/178.jpg", "description":"Image 04 description","id":"1"},
{"imae":"img/178.jpg", "description":"Image 05 description","id":"1"}
];
这里有个数组,使用angularjs如何将id=0的两组数据写入到下面的html标签里呢?
<img ng-src="{{imae}}" slt="{{description}}“/> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询