@ngx-translate/http-loader
- Version 18.0.0
- Published
- 15.9 kB
- 1 dependency
- MIT license
Install
npm i @ngx-translate/http-loaderyarn add @ngx-translate/http-loaderpnpm add @ngx-translate/http-loaderOverview
http loader for dynamically loading translation files for @ngx-translate/core
Index
Variables
Functions
Classes
Interfaces
Variables
variable TRANSLATE_HTTP_LOADER_CONFIG
const TRANSLATE_HTTP_LOADER_CONFIG: InjectionToken< Partial<TranslateMultiHttpLoaderConfig>>;Functions
function provideTranslateHttpLoader
provideTranslateHttpLoader: ( config?: Partial<TranslateHttpLoaderConfig | TranslateMultiHttpLoaderConfig>) => Provider[];function provideTranslateMultiHttpLoader
provideTranslateMultiHttpLoader: ( config?: Partial<TranslateMultiHttpLoaderConfig>) => Provider[];Classes
class TranslateHttpLoader
class TranslateHttpLoader implements TranslateLoader {}constructor
constructor();property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateHttpLoader, never>;property ɵprov
static ɵprov: i0.ɵɵInjectableDeclaration<TranslateHttpLoader>;method getTranslation
getTranslation: (lang: string) => Observable<TranslationObject>;Gets the translations from the server
Interfaces
interface TranslateHttpLoaderConfig
interface TranslateHttpLoaderConfig {}property enforceLoading
enforceLoading: boolean;property failOnError
failOnError?: boolean;If true, a failed HTTP fetch (e.g. 404) propagates the error and fails the whole language load (v17 behaviour). If false (default), each resource failure is caught and replaced with an empty object, with a
console.warnper failure; remaining resources still contribute their keys. Set this totrueif you want deploys to fail loudly on a missing translation file rather than serve partial translations.
property prefix
prefix?: string;property suffix
suffix?: string;property useHttpBackend
useHttpBackend: boolean;interface TranslateHttpLoaderResource
interface TranslateHttpLoaderResource {}interface TranslateMultiHttpLoaderConfig
interface TranslateMultiHttpLoaderConfig {}property enforceLoading
enforceLoading: boolean;property failOnError
failOnError?: boolean;property resources
resources: (string | TranslateHttpLoaderResource)[];property useHttpBackend
useHttpBackend: boolean;Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (3)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ngx-translate/http-loader.
- Markdown[](https://www.jsdocs.io/package/@ngx-translate/http-loader)
- HTML<a href="https://www.jsdocs.io/package/@ngx-translate/http-loader"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2797 ms. - Missing or incorrect documentation? Open an issue for this package.
