ordinalNumber scans a string for cardinal numbers and rewrites each one as its ordinal form (1 → 1st, 2 → 2nd, …). Pass the four locale suffixes as arguments so the pipe is fully i18n-friendly.
<span [innerHTML]="text | ordinalNumber: 'st':'nd':'rd':'th'"></span>
import { Component } from '@angular/core';
import { BsOrdinalNumberPipe } from '@mintplayer/ng-bootstrap/ordinal-number';
@Component({
selector: 'my-ordinal-demo',
templateUrl: './my-ordinal-demo.component.html',
imports: [BsOrdinalNumberPipe],
})
export class MyOrdinalDemoComponent {
protected text = 'The 1st, 2nd, 3rd and 4th places.';
}