From 905014bd09994b784dc467ae2884a1a3e99875de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Wed, 13 Mar 2024 15:37:53 +0800 Subject: [PATCH] fix(cli): add `./` current fold in `startup.service` (#1780) --- .../application/files/src/app/core/startup/startup.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schematics/application/files/src/app/core/startup/startup.service.ts b/schematics/application/files/src/app/core/startup/startup.service.ts index 12d3d518f..31f34c2f0 100644 --- a/schematics/application/files/src/app/core/startup/startup.service.ts +++ b/schematics/application/files/src/app/core/startup/startup.service.ts @@ -35,8 +35,8 @@ export class StartupService { private router = inject(Router);<% if (i18n) { %> private i18n = inject(ALAIN_I18N_TOKEN);<% } %> // 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) }) - private appData$ = this.httpClient.get('assets/tmp/app-data.json').pipe( + // this.httpClient.get('/app', { context: new HttpContext().set(ALLOW_ANONYMOUS, true) }) + private appData$ = this.httpClient.get('./assets/tmp/app-data.json').pipe( catchError((res: NzSafeAny) => { console.warn(`StartupService.load: Network request failed`, res); setTimeout(() => this.router.navigateByUrl(`/exception/500`));