Open Maksclub opened 11 months ago
Transloco
No
Loader definition:
export const provideAppLangScope = () => { return provideTranslocoScope({ scope: 'app', alias: 'app', loader: SUPPORTED_LANGUAGES.reduce((acc: HashMap<() => Promise<Translation>>, lang) => { acc[lang] = () => import(`./i18n/${lang}.json`); return acc; }, {}) }) }
Routes definition:
// working (on /not route) { path: 'not', loadChildren: () => import('./page.not-found/routes').then(m => m.ROUTES), providers: [ provideAppLangScope(), ], }, // not working on /bla-bla-bla { path: '**', loadChildren: () => import('./page.not-found/routes').then(m => m.ROUTES), providers: [ provideAppLangScope(), ], }
ROUTES definition:
export const ROUTES = [ { path: '', loadComponent: async () => (await import(`./not-found`)).NotFoundComponent, }, ] as Route[];
loader for '**' route definition working correct
'**'
-
No response
Transloco: ^6.0.0 Angular: 16 Node: v20.6.1 Package Manager: 9.8.1 OS: Mac OS
Chrome Safari Firefox
I provided provideAppLangScope() in NotFound component and it's working! Temporal solution for me
Is there an existing issue for this?
Which Transloco package(s) are the source of the bug?
Transloco
Is this a regression?
No
Current behavior
Loader definition:
Routes definition:
ROUTES definition:
Expected behavior
loader for
'**'
route definition working correctPlease provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.
-
Transloco Config
No response
Please provide the environment you discovered this bug in
Browser
Additional context
No response
I would like to make a pull request for this bug
No