http-loader
http-loader copied to clipboard
A loader for ngx-translate that loads translations with http calls
Updating Angular to version 13 resolves the issue logged under #101
When new bundle is deployed to production server and new translation keys have been added, last JSON is cached. It would be nice if, somehow, the loader could fetch the...
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.3. Commits ad44493 [dist] 1.5.3 c798461 [fix] Fix host parsing for file URLs (#210) 201034b [dist] 1.5.2 2d9ac2c [fix] Sanitize only special URLs (#209) fb128af...
**EDIT:** nevermind, just use ngx-universal, since I'm using Universal (hope I solve the `Cannot resolve 'fs' module` thing). Writing this ``` export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http, './assets/i18n/',...
## Current behavior Currently TranslateHttpLoader produces HTTP request every time **getTranslation** is called. ## Expected behavior TranslateHttpLoader should store state of language file loading and only one HTTP request is...
This contains the solution for loading multiple translates files without causing any issue with the TranslateHttpLoader to maintain backward compatibility
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. Commits See full diff in compare view [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter...
Im using nativescript-angular ``` TranslateModule.forRoot({ loader: { provide: TranslateLoader, deps: [HttpClient], useFactory: (createTranslateLoader) } }) .... { provide: HTTP_INTERCEPTORS, useClass: HttpInterceptorService, multi: true }, ... export function createTranslateLoader(httpClient: HttpClient) {...
When getting translations from other server like this ```typescript export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http, 'http://www.example.com/assets/i18n/', '/translations.json'); } ``` I get the following cors error: _Access to XMLHttpRequest...
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4. Commits ebdf849 1.3.4 ac57872 move all allocUnsafes to allocs for easier maintenance c64c950 1.3.3 0598ba1 fix .. in encodingLength 010aedb 1.3.2 0d0d593 backport encodingLength...