UNPKG

angular-l10n

Version:

An Angular library to translate messages, dates and numbers

107 lines 3.86 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ import { NgModule } from '@angular/core'; import { TranslationModule, provideRoot, provideChild } from './translation.module'; import { InjectorRef } from '../models/injector-ref'; import { Logger } from '../models/logger'; import { L10nDatePipe } from '../pipes/l10n-date.pipe'; import { L10nDecimalPipe, L10nPercentPipe, L10nCurrencyPipe } from '../pipes/l10n-number.pipe'; import { L10nDateDirective } from '../directives/l10n-date.directive'; import { L10nDecimalDirective, L10nPercentDirective, L10nCurrencyDirective } from '../directives/l10n-number.directive'; /** * Provides dependencies, pipes & directives for translating messages, dates & numbers. */ var LocalizationModule = /** @class */ (function () { function LocalizationModule(injector, logger) { this.injector = injector; this.logger = logger; } /** * Use in AppModule: new instances of LocaleService & TranslationService. */ /** * Use in AppModule: new instances of LocaleService & TranslationService. * @param {?} l10nConfig * @param {?=} token * @return {?} */ LocalizationModule.forRoot = /** * Use in AppModule: new instances of LocaleService & TranslationService. * @param {?} l10nConfig * @param {?=} token * @return {?} */ function (l10nConfig, token) { if (token === void 0) { token = {}; } return { ngModule: LocalizationModule, providers: provideRoot(l10nConfig, token) }; }; /** * Use in feature modules with lazy loading: new instance of TranslationService. */ /** * Use in feature modules with lazy loading: new instance of TranslationService. * @param {?} l10nConfig * @param {?=} token * @return {?} */ LocalizationModule.forChild = /** * Use in feature modules with lazy loading: new instance of TranslationService. * @param {?} l10nConfig * @param {?=} token * @return {?} */ function (l10nConfig, token) { if (token === void 0) { token = {}; } return { ngModule: LocalizationModule, providers: provideChild(l10nConfig, token) }; }; LocalizationModule.decorators = [ { type: NgModule, args: [{ declarations: [ L10nDatePipe, L10nDecimalPipe, L10nPercentPipe, L10nCurrencyPipe, L10nDateDirective, L10nDecimalDirective, L10nPercentDirective, L10nCurrencyDirective ], imports: [ TranslationModule ], exports: [ TranslationModule, L10nDatePipe, L10nDecimalPipe, L10nPercentPipe, L10nCurrencyPipe, L10nDateDirective, L10nDecimalDirective, L10nPercentDirective, L10nCurrencyDirective ] },] } ]; /** @nocollapse */ LocalizationModule.ctorParameters = function () { return [ { type: InjectorRef }, { type: Logger } ]; }; return LocalizationModule; }()); export { LocalizationModule }; if (false) { /** @type {?} */ LocalizationModule.prototype.injector; /** @type {?} */ LocalizationModule.prototype.logger; } //# sourceMappingURL=localization.module.js.map