In my ts I have this array:
locations: string[];
builder() {
this.locations = [
'01-34-56-75-41',
'10-34-22-75-53',
'26-34-34-75-63',
'00-89-56-75-43',
'10-34-56-75-43',
'20-33-56-75-43',
'00-34-56-75-43',
'00-34-56-75-43',
'00-34-56-75-43',
'00-34-56-75-43',
];
}
In my html:
<div class="row">
<p id="p" style="font-size: 30px;">Máximo:<input style="margin-left: 10px; font-size: 30px;" type="text">
<div *ngFor="let ubicacion of ubicaciones"><button>{{ ubicacion | slice:0:2 }}</button></div>
</div>
With the pipe slice I managed to get the first two digits of each location and put them in a button but now I need to remove the duplicates and order them from smallest to largest.
Help, please!
