I've encountered an issue while setting up the latest version of angular-i18next in my Angular 18.1.0 application that is built with module-federation. The problem arises during the initialization phase with the following error:
TypeError: Cannot read properties of undefined (reading 'call')
at I18NextService.subscribeEvents (angular-i18next.mjs:391:25)
at I18NextService.init (angular-i18next.mjs:323:14)
at app.modules.ts:13:10
Upon investigating how the i18next service is provided, I noticed it is wrapped in an InjectionToken. I attempted to initialize it using the following approach:
I will be closing this issue as It worked for me after a shared the library through an npm lib where i created wrappers for what i needed to use in all mfes
Hello
I've encountered an issue while setting up the latest version of angular-i18next in my Angular 18.1.0 application that is built with module-federation. The problem arises during the initialization phase with the following error:
TypeError: Cannot read properties of undefined (reading 'call') at I18NextService.subscribeEvents (angular-i18next.mjs:391:25) at I18NextService.init (angular-i18next.mjs:323:14) at app.modules.ts:13:10
Upon investigating how the i18next service is provided, I noticed it is wrapped in an InjectionToken. I attempted to initialize it using the following approach:
How can I resolve this issue to ensure the language switching works correctly with the latest version of angular-i18next?
Reproducing Issue: sandbox Preview: https://dyx2jl-35923.csb.app/