Skip to content

Commit

Permalink
fix: add ./ current fold in startup.service (#2489)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Mar 13, 2024
1 parent 65c35b8 commit cae36dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/core/i18n/i18n.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class I18NService extends AlainI18nBaseService {
}

loadLangData(lang: string): Observable<NzSafeAny> {
return this.http.get(`assets/tmp/i18n/${lang}.json`);
return this.http.get(`./assets/tmp/i18n/${lang}.json`);
}

use(lang: string, data: Record<string, unknown>): void {
Expand Down
4 changes: 2 additions & 2 deletions src/app/core/startup/startup.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export class StartupService {
load(): Observable<void> {
const defaultLang = this.i18n.defaultLang;
// If http request allows anonymous access, you need to add `ALLOW_ANONYMOUS`:
// this.httpClient.get('assets/tmp/app-data.json', { context: new HttpContext().set(ALLOW_ANONYMOUS, true) })
return zip(this.i18n.loadLangData(defaultLang), this.httpClient.get('assets/tmp/app-data.json')).pipe(
// this.httpClient.get('/app', { context: new HttpContext().set(ALLOW_ANONYMOUS, true) })
return zip(this.i18n.loadLangData(defaultLang), this.httpClient.get('./assets/tmp/app-data.json')).pipe(
// 接收其他拦截器后产生的异常消息
catchError(res => {
console.warn(`StartupService.load: Network request failed`, res);
Expand Down

0 comments on commit cae36dd

Please sign in to comment.