parent
8a8c53250e
commit
56dce0e26d
|
@ -12,7 +12,7 @@
|
||||||
* Entry point for all public APIs of the common package.
|
* Entry point for all public APIs of the common package.
|
||||||
*/
|
*/
|
||||||
export * from './location/index';
|
export * from './location/index';
|
||||||
export {NgLocalization} from './localization';
|
export {NgLocaleLocalization, NgLocalization} from './localization';
|
||||||
export {CommonModule} from './common_module';
|
export {CommonModule} from './common_module';
|
||||||
export {NgClass, NgFor, NgIf, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet} from './directives/index';
|
export {NgClass, NgFor, NgIf, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet} from './directives/index';
|
||||||
export {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe} from './pipes/index';
|
export {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe} from './pipes/index';
|
||||||
|
|
|
@ -49,10 +49,10 @@ export function getPluralCategory(
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class NgLocaleLocalization extends NgLocalization {
|
export class NgLocaleLocalization extends NgLocalization {
|
||||||
constructor(@Inject(LOCALE_ID) private _locale: string) { super(); }
|
constructor(@Inject(LOCALE_ID) protected locale: string) { super(); }
|
||||||
|
|
||||||
getPluralCategory(value: any): string {
|
getPluralCategory(value: any): string {
|
||||||
const plural = getPluralCase(this._locale, value);
|
const plural = getPluralCase(this.locale, value);
|
||||||
|
|
||||||
switch (plural) {
|
switch (plural) {
|
||||||
case Plural.Zero:
|
case Plural.Zero:
|
||||||
|
|
|
@ -135,6 +135,13 @@ export declare class NgIf {
|
||||||
constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext>);
|
constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @experimental */
|
||||||
|
export declare class NgLocaleLocalization extends NgLocalization {
|
||||||
|
protected locale: string;
|
||||||
|
constructor(locale: string);
|
||||||
|
getPluralCategory(value: any): string;
|
||||||
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare abstract class NgLocalization {
|
export declare abstract class NgLocalization {
|
||||||
abstract getPluralCategory(value: any): string;
|
abstract getPluralCategory(value: any): string;
|
||||||
|
|
Loading…
Reference in New Issue