@ngx-translate/http-loader
Version:
http loader for dynamically loading translation files for @ngx-translate/core
28 lines (25 loc) • 1.07 kB
TypeScript
import * as i0 from '@angular/core';
import { InjectionToken, Provider } from '@angular/core';
import { TranslateLoader, TranslationObject } from '@ngx-translate/core';
import { Observable } from 'rxjs';
interface TranslateHttpLoaderConfig {
prefix: string;
suffix: string;
enforceLoading: boolean;
useHttpBackend: boolean;
}
declare const TRANSLATE_HTTP_LOADER_CONFIG: InjectionToken<Partial<TranslateHttpLoaderConfig>>;
declare class TranslateHttpLoader implements TranslateLoader {
private http;
private config;
constructor();
/**
* Gets the translations from the server
*/
getTranslation(lang: string): Observable<TranslationObject>;
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateHttpLoader, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<TranslateHttpLoader>;
}
declare function provideTranslateHttpLoader(config?: Partial<TranslateHttpLoaderConfig>): Provider[];
export { TRANSLATE_HTTP_LOADER_CONFIG, TranslateHttpLoader, provideTranslateHttpLoader };
export type { TranslateHttpLoaderConfig };