Commits

William Welling authored 600fbc6df7c
update json5 import
No tags

src/ngx-translate-loaders/translate-json5-http.loader.ts

Modified
1 1 import { HttpClient } from '@angular/common/http';
2 2 import { TranslateLoader } from '@ngx-translate/core';
3 3 import { map } from 'rxjs/operators';
4 -import JSON5 from 'json5';
4 +import * as JSON5 from 'json5';
5 5
6 6 export class TranslateJson5HttpLoader implements TranslateLoader {
7 7 constructor(private http: HttpClient, public prefix?: string, public suffix?: string) {
8 8 }
9 9
10 10 getTranslation(lang: string): any {
11 11 return this.http.get('' + this.prefix + lang + this.suffix, {responseType: 'text'}).pipe(
12 12 map((json: any) => JSON5.parse(json))
13 13 );
14 14 }
15 15 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut