doc(i18nPluralPipe): update API doc example (#9862)
This commit is contained in:
parent
f29457f3f0
commit
776a83f9da
|
@ -26,9 +26,23 @@ const _INTERPOLATION_REGEXP: RegExp = /#/g;
|
|||
* ## Example
|
||||
*
|
||||
* ```
|
||||
* <div>
|
||||
* {{ messages.length | i18nPlural: messageMapping }}
|
||||
* </div>
|
||||
* class MyLocalization extends NgLocalization {
|
||||
* getPluralCategory(value: any) {
|
||||
* if(value > 1) {
|
||||
* return 'other';
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @Component({
|
||||
* selector: 'app',
|
||||
* template: `
|
||||
* <div>
|
||||
* {{ messages.length | i18nPlural: messageMapping }}
|
||||
* </div>
|
||||
* `,
|
||||
* providers: [{provide: NgLocalization, useClass: MyLocalization}]
|
||||
* })
|
||||
*
|
||||
* class MyApp {
|
||||
* messages: any[];
|
||||
|
|
Loading…
Reference in New Issue