我需要过滤json,这是我的html:
<span style="margin-top: 8px;" ng-repeat="(key, val) in task.depencies | jsonFilter">
<%val.name%> From: <%val.start_date | dateFilter | date:'dd/MM/yyyy'%> To: <%val.end_date | dateFilter | date:'dd/MM/yyyy'%>,
</span>
这是我的过滤器:
filter('jsonFilter', jsonFilter);
function jsonFilter()
{
return function (input) {
input = angular.fromJson(input);
return input;
};
所以我需要对此进行过滤:task.depencies
然后发送trought ng-repeat。