Inline Loaders
export const loader = ['en', 'es'].reduce((acc, lang) => {
acc[lang] = () => import(`../i18n/${lang}.json`);
return acc;
}, {});
export const FEATURE_ROUTES: Route = {
path: 'feature',
loadComponent: () =>
import('./feature.component').then((FeatureComponent) => FeatureComponent),
providers: [
provideTranslocoScope({
scope: 'myFeature',
loader,
}),
],
};Was this helpful?

