is there a way to use the moment.format method in HTML? I'm currently using the toLocaleDateString method to display an array of dates:
<ng-template let-event>
<div>{{event.date.toLocaleDateString('en-US')}} </div>
</ng-template>
But I would like to use something like:
<ng-template let-event>
<div>{{moment(event.date).format('DD.MM.YYYY')}}</div>
</ng-template>
For now I get the error: "ERROR TypeError: ctx_r11.moment is not a function" even though it's working without issues when using it in the ts file via the console.log