How can i display my the current date inside my ionic app ?
In your ts-file, with a variable ‘today’ (no type given)
this.today = Date.now();
Then in your html
<some-tag-you-want>{{ today }}</some-tag-you-want>
If you want to display it in another form, just use the built-in datepipe like this:
<some-tag-you-want>{{ today | date: 'dd/MM/yyyy HH:mm' }}</some-tag-you-want>
2 Likes