← All pipes
Localization

pluralCategory

Expose Intl cardinal/ordinal category for custom presentation.

Use it in your component

Standalone component
import { Component } from '@angular/core';
import { PluralCategoryPipe } from 'extra-pipe';

@Component({
  standalone: true,
  imports: [PluralCategoryPipe],
  template: `{{ 2 | pluralCategory: "cardinal" }}`,
})
export class ExampleComponent {

}

Template
{{ 2 | pluralCategory: "cardinal" }}

Try it live.

The output below runs the packed library. Edit data, not code.

Use double quotes for text, or a number, array, object or null.
Ordered parameters: kind. Locale is controlled separately.
Applied to the live output.
Live template data
readonly value = 2;
readonly parameter0 = "cardinal";
{{ value | pluralCategory: parameter0: "en-US" }}

Rendered output

other