Reputation: 743
<tr *ngFor="let file of filesList; let i=index">
<td><input class="form-control input-sm" value="{{ file.url }}"/></td>
<td>{{ file.size/1024 | round }} Kb</td>
<td>{{ file.lastModifiedDate }} </td>
</tr>
I see file has this property in console log, how can I print it?
Upvotes: 0
Views: 328
Reputation: 743
I found:
Though present in early draft of the File API spec, this property has been removed from it and is now non-standard. Use File.lastModified instead.
and
<td>{{ file.modified * 1000 | date:'MM-dd-yyyy' }} </td>
it helped me
Upvotes: 1
Reputation: 4838
Date Pipe will help you, please see below:
<td>{{file.lastModifiedDate | date}}</td>
This will format your date, see my link above for different formats
Upvotes: 1