-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circular dependency in DI detected for Router #94
Comments
@tmkd92 Do you still have the issue ? |
Hello @gilsdav, yes I am. Apart from above I found that on Angular v9 there is no issue with Router dependency. It looks like some changes has been applied to ngcc towards angular router.. |
That's quite strange because you can see in this project, it works as expected in ng 10 and 11: https://github.com/gilsdav/angular-universal-localize-router Do you have something like an Injector that uses the Router ? |
My AppComponent is using Router as DI, could that cause the problem here? |
Definitly not. Is it possible for you to share de reproduction project ? |
Same here. Use APP_INITIALIZER in providers section. APP_INITIALIZER use a service as dependency that is provided in root. Secondary i use a http interceptor... if remove both, no error shown. Cant figure it out. |
Hi @gilsdav, thank you for your work. I'm building a custom boilerplate that must be able to work with and without SSR. Everything works great in SSR mode (at least with
Something i'm missing ? |
✅ I fixed my case by removing the parameter Now everything works in SSR and in SLA modes ! |
I'm experiencing the same issue. I have followed the import guide. I'm on angular 11 Followed @WheelyWonka fixed and it resolved it for me. The documentation is really hard to follow. Can the owners to include more examples and a clearer setup. Thanks |
@WheelyWonka, thanks, helped in my case |
@WheelyWonka You goddamnit hero! I've been losing my mind on this one |
@WheelyWonka you're the man! |
On my case the error was -->
This getBrowserLang caused the router error fixed with:
|
Hi, If I don't put it on TranslateModule.forRoot I get a blank page with unknown error. What it can be causing it? If i manually put in localstorage key lang with value en or es . It works |
@WheelyWonka Thanks you saved my day!! |
When trying to use latest library version with Angular v10 I'm receiving errors connected with library.
My implementation looks like below:
The text was updated successfully, but these errors were encountered: