NgPlural

Experimental

Directive

What it does

Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.

How to use

<some-element [ngPlural]="value"> <ng-template ngPluralCase="=0">there is nothing</ng-template> <ng-template ngPluralCase="=1">there is one</ng-template> <ng-template ngPluralCase="few">there are a few</ng-template> </some-element>

Class Overview

class NgPlural {
constructor(_localization: NgLocalization)

ngPlural 
addCase(value: string, switchView: SwitchView) : void

}

Selectors

[ngPlural]

Class Description

Constructor

constructor(_localization: NgLocalization)

Class Details

exported from common/index, defined in common/src/directives/ng_plural.ts