Bug(scope): Transloco with NX and module federation
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Which Transloco package(s) are the source of the bug?
Transloco
Is this a regression?
No
Current behavior
In my NX monorepo I have 2 apps angular. I’m using module federation to have access to the 2nd app from the first one. Transloco is working fine in the first app but in the second app I have the following error : -ERROR Error: NG0200: Circular dependency in DI detected for TranslocoService
Expected behavior
Would like to be able to use transloco in every app of the nx monorepo
Please provide a link to a minimal reproduction of the bug
I don’t have link to provide
Transloco Config
No response
Please provide the environment you discovered this bug in
Transloco: 4.0.0
Angular: 13.3.2
Node: 16
Package Manager:
OS: ubuntu
Browser
Chrome v101.0.4951.41
Additional context
No response
I would like to make a pull request for this bug
No
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Module Federation · Issue #490 · ngneat/transloco - GitHub
Has the team thought of including some way to work with Module Federation? I have tried using scopes but have not been able...
Read more >Pitfalls with Module Federation and Angular
In this article, I'm going to destroy my Module Federation example! However, you don't need to worry: It's for a very good reason....
Read more >ngneat-transloco/lobby - Gitter
Hi Guys, I am trying to join the scoped translation files using ng generate @ngneat/transloco:join but I receive the following error. Any ideas...
Read more >Module Federation in Nx and Angular generates an error ...
I have checked the regular template generated by angular, it uses the defer style to everything, so the other js file entries are...
Read more >I18N for Angular microfrontends using Ngx-Locutus
Every translation has a scope; Every translation is pure Typescript; Translations are registered ... Quilt — A module federation library and web-component.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
First last version of NX is installed. the module federation settings is the following: I have a shell angular app and a host angular app. IN THE SHELL APP:
app.modules.ts
transloco-root.module.ts
Within shell app few modules and their components have been added, example of one module
in the template of the component I’m using transloco pipe for the translation.
IN THE HOST APP:
app.module.ts
entry.module.ts (for module federation)
transloco-root.module.ts (different from the one in the shell app)
Hope that will help. Let me know if you need more.
Thank you for your solution. It works very well !!