So I have a button that when clicked displays a list of data. I am adding a font awesome font in there if the JSON key value exists. But here is the problem. The key is a date. I need my ng-show to check if this date is within 30 days of todays date. My code for button is:
<button class="naviaBtn naviaBlue" ng-click="alertShow = (alertShow == 4 ? -1 : 4)"><i class="fa fa-exclamation-circle fa-2x" ng-show="ppt.Dates.key == todaysDate"></i>recent denials</button>
The object array in JSON is:
"Dates": [
{
"key": "2/25/2016",
"value": "The last day to add or edit your March GoNavia Commuter Benefits order."
},
{
"key": "3/31/2016",
"value": "The last day to submit claims for your 2015 Health Care FSA."
},
{
"key": "3/31/2016",
"value": "The last day to submit claims for your 2015 Day Care FSA."
}
],
How can I achieve this correctly? Have tried with using '.length <=' type of thing, but no luck.
Thanks much.