The ion-range component is great. However I cannot find a way to change the text on the pin. I want to create a music player which should show values like 01:12 the position of the audio. Currently, I find no way to change the text on the pin of the ion-range component to anything else than the integer.
<ion-range pin="true" (ionChange)="seekPosition()" min="0" [max]="audio.duration" color="primary" [(ngModel)]="position">
<ion-label range-left>{{ position | time }}</ion-label>
<ion-label range-right>{{ audio.duration | time }}</ion-label>
</ion-range>
The “time” pipe transforms an integer into a formatted time. E.g. 130 would become 02:10. It would be nice to have this kind of formatted output on the pin!
In my case, I had my step at 15 and wanted to show the pin text in hours with a max being 12 hours.
This will take the range value at 360 and change it to display 6 hours or 675 and change it into 6.25 hours.
I also changed the CSS t show the pin text all the time by doing transform: none !important; on .range-pin, but is optional.