Seconds format like mm: ss in Angular 2
I show a few seconds that count from 3600 to 0.
<div class="time-box" *ngIf="p.value.playerTimer > 0">{{ p.value.playerTimer }}</div>
I would like to format the number of seconds as minutes: seconds
I was hoping I could use DatePipe - https://angular.io/api/common/DatePipe
<div class="time-box" *ngIf="p.value.playerTimer > 0">{{ p.value.playerTimer | date:'mmss' }}</div>
But this does not work, as he expects to p.value.playerTimerbe an object of date or the number of seconds from an era.
Is there any other way to achieve this?
+4