diff --git a/modules/@angular/common/src/pipes/i18n_plural_pipe.ts b/modules/@angular/common/src/pipes/i18n_plural_pipe.ts index 16fe952115..f1b7cfec9a 100644 --- a/modules/@angular/common/src/pipes/i18n_plural_pipe.ts +++ b/modules/@angular/common/src/pipes/i18n_plural_pipe.ts @@ -26,9 +26,23 @@ const _INTERPOLATION_REGEXP: RegExp = /#/g; * ## Example * * ``` - *
- * {{ messages.length | i18nPlural: messageMapping }} - *
+ * class MyLocalization extends NgLocalization { + * getPluralCategory(value: any) { + * if(value > 1) { + * return 'other'; + * } + * } + * } + * + * @Component({ + * selector: 'app', + * template: ` + *
+ * {{ messages.length | i18nPlural: messageMapping }} + *
+ * `, + * providers: [{provide: NgLocalization, useClass: MyLocalization}] + * }) * * class MyApp { * messages: any[];