Angular10 NgPluralCase Directive
In this article, we are going to see what is NgPluralCase in Angular 10 and how to use it.
The NgPluralCase in Angular10 is used to create a view that will be added or removed from the parent NgPlural when the given expression matches the plural expression. We can use the values to make the output plural or singular based on the conditions.
NgModule: Module used by NgPluralCase is:
- Create the Angular app to be used.
- There is no need for any import for the NgPluralCase to be used.
- Define a variable in app.component.ts
- in app.component.html use ngPlural with ngPluralCase directive in the element with conditions to be checked.
- Serve the angular app using ng serve to see the output.