![]() |
VOOZH | about |
The ng-pluralize Directive in AngularJS is used to specify the message to display according to the en-us localization rules. The en-us localization rules are bundled with AngularJS. The default plural category in AngularJS is "one" and "other".
Syntax: The ng-pluralize Directive can be used:
As element:
<ng-pluralize count="" when="string" [offset="number"]> Contents... </ng-pluralize>
As attribute:
<element ng-pluralize count="" when="string" [offset="number"]> Contents... </element>
Parameter Values:
Example 1: This example uses the ng-pluralize Directive to display content.
Output:
Example 2: This example uses the ng-pluralize Directive to display the input text content.
Output: