kuka
kuka

Reputation: 743

why doesnt print property file.lastModifiedDate of file?

<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? enter image description here

Upvotes: 0

Views: 328

Answers (2)

kuka
kuka

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

Wesley Coetzee
Wesley Coetzee

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

Related Questions