javascript - How to include DatePipe in HTML to print lastModifiedDate -


i have file-upload.component.ts import datepipe

import { datepipe } '@angular/common';

then i

export class fileuploadcomponent implements oninit { datepipe = new datepipe(); }

and in file-upload.component.html set

  <td>{{ file.lastmodifieddate | date }} </td>  

where mistake?

the datepipe shouldn't need imported @ all. it's built in , can used out of box


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -