I need to pass an item property in an ng-repeat to the controller like this:
<li ng-repeat="feed in feeds | filter:customFilter(feed,feed.publishedDate) ">
Sending feed.publishedDate like this does't work, how should I do that?
Or could I access this property in the controller? item.publishedDate doesn;t work... I need it to compare it with the actual time and filter the news by last hour, last 4 hours, ...
$scope.customFilter = function (item, publishedDate) {
var currentTime = new Date();
if($scope.timeinterval==1){
....
}