Skip to content
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 ApplicationRef after ngx-smart-modal and angular upgrade #387

Open
Bierat1337 opened this issue Jan 30, 2024 · 2 comments

Comments

@Bierat1337
Copy link

Hi,

I upgraded Angular 15 to 16 and ngx-smart-modal from 7.1.1 to 14.0.3.
After the upgrade I am getting the following error:

Error: NG0200: Circular dependency in DI detected for ApplicationRef. Find more at https://angular.io/errors/NG0200
at throwCyclicDependencyError (core.mjs:228:11)
at R3Injector.hydrate (core.mjs:9448:13)
at R3Injector.get (core.mjs:9323:33)
at injectInjectorOnly (core.mjs:842:40)
at Module.ɵɵinject (core.mjs:848:60)
at Object.NgxSmartModalService_Factory [as factory] (ngx-smart-modal.mjs:284:104)
at core.mjs:9454:43
at runInInjectorProfilerContext (core.mjs:798:9)
at R3Injector.hydrate (core.mjs:9453:17)
at R3Injector.get (core.mjs:9323:33)

I tried to find the issue, but the circular dependency error isn't caused by any of my created components or services. It seems to be caused by the upgrade of the lib.

Do you guys have any idea how to fix this issue?

regards,
Bierat

@maximelafarie
Copy link
Owner

Hi, there,

sorry, I got married recently and have had a lot going on at the moment which (once again) has made it very difficult for me to refocus.

The problem you are experiencing may be due to the double import of ApplicationRef into NgxSmartModalService. I'm surprised more people haven't had this error. I'm going to get more fixes on board soon, just to make sure the code base is clean.

Stay tuned 🖖

@Bierat1337
Copy link
Author

Hi,

congratulations on getting married!
Thanks for responding to my issue. I saw you already sent a PR for that and some others issues. Do you know when it will be merged into master as a new version?

Regards,
Bierat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants