I have looked a lot of places and cant seem to find what I am looking for. It is probably simple but I am newer to angular and cant seem to figure it out.
The ng-repeat works fine as it is, but I want to filter out certain values.
I have a page with ng-repeat through data (see data object below) and I want to only include ones where current date > item value in array (date).
vm.newsItems= [
{
ID: '1',
date: '5/12/2016',
newsTitle: 'This is news story header 1',
newsText: 'This is news Story Text 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
},
{
ID: '2',
date: '5/30/2016',
newsTitle: 'This is news story header 2',
newsText: 'This is news Story Text 2. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
}
code on page:
<div class="box effect8" ng-repeat="newsItem in vm.newsItems">
<h3>{{newsItem.newsTitle}}</h3>
{{newsItem.newsText}}
</div>
datefilter. but date parameter from your JSON object must be of type date of javascript.Datedisplay format, not for filtering out items in an array