Reputation: 12855
I am using angular 2 beta 12.
When I do:
<div *ngFor="#s of items">
<div style="font-weight:bold;">
<p>{{ s.startDate }}</p>
<p>{{ s.endDate | date }}</p>
</div>
</div>
The startDate is displayed.
The endDate using the date pipe does not display the date!
How must the datetime string 'endDate' look like that it is a 'valid' date string for the date pipe?
Upvotes: 0
Views: 439
Reputation: 1040
This format seems to be invalid. You should see some error messages on your console.
Try to wrap your date into a JS Date Object with endDate = new Date(endDate);
Upvotes: 1