I’m trying to filter a json object, only showing results that match today’s date.
template.html
<ion-item-sliding *ngFor="let job of filteredJobs">
<div *ngIf="(job.schedule | date: 'MM/dd/yy') == (today | date:'MM/dd/yy')">
<h2>{{job.title}}</h2>
<p>{{job.description}}</p>
</div>
</ion-item-sliding>
I have the *ngIf
statement wrong but I don’t know how to fix it.
today
is declared in template.ts
today: String = new Date().toISOString();
I have printed out the variables and they are in fact identical 01/22/17
. Thanks for any help!