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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -