I need assistance with controlling the date format of dates displayed in different components using one typescript file. How can I achieve this?
app.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: `<router-outlet></router-outlet>`
})
export class AppComponent {
Today=Date.now();
}
app.html
<div class="row">
<p>Current Date : {{Today | date}}</p>
</div>
Thank you in advance for your help!