angular.module('harbinger').
directive('dossierList', function () {
return {
restrict:"EAC",
template:'<div class="Dossier-details" data-ng-repeat="d in model.dossier | filter:{status:"POI"}">'+
'<p>'+
'<strong>'+'Dossier ID'+'</strong>:'+
'<small>'+'{{ d.title }}'+'</small>'+
'</p>'+
'</div>',
etc........
我想使用状态过滤数组,我用过filter:{status:"POI"}
,但它抛出错误
我的 json
[
{
"id": "1",
"status": "POI",
"title": "West Nile virus - US",
"dossierId": "000455"
},
{
"id": "2",
"status": "I",
"title": "influenza",
"dossierId": "000455"
},
{
"id": "4",
"status": "P",
"title": "corona virus",
"dossierId": "000455"
}
]