0

I have model like this:

[{
  "TaskDate": "2015-01-04T00:00:00",
  "TimesheetList": [{
    "WorkItemId": 24,
    "ProjectId": 13,
    "ProjectName": "My Project",
    "UserId": 12,
    "UserName": "Some User",
    "Date": "2015-01-04T22:00:00",
    "Task": "Some text",
    "TimeWorked": 2.0,
    "Note": null
  }]
}]

This data views in table, and I need to add filters by user and by date(from-to) How to do this in angular? I add my example to PLUNKER

HUSTLIN
  • 196
  • 4
  • 17

1 Answers1

0

you can create a function in your controller example :

$scope.filterFN = function(model){

          //here check for the userid and date range
          //return true or false

};

In your html...

ng-repeat="model in models | filter: filterFN"
J.Vassallo
  • 2,282
  • 3
  • 15
  • 14