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

Support for Angular 18 standalone component. NullInjectorError: No provider for _SweetAlert2LoaderService! #266

Closed
suhailkc opened this issue Sep 16, 2024 · 1 comment · Fixed by #271
Labels

Comments

@suhailkc
Copy link

I am using ngx-sweetalert2 in an Angular lazy-loaded standalone component, but I'm encountering the following error in the console: NullInjectorError: No provider for _SweetAlert2LoaderService!

..
import { SweetAlert2Module } from '@sweetalert2/ngx-sweetalert2';

@Component({
..
standalone: true,
imports: [SweetAlert2Module],
..
})
..

How to fix this without adding the SweetAlert2Module.forRoot() to importProvidersFrom([]) in app.config.ts?

@limonte
Copy link
Member

limonte commented Jan 26, 2025

🎉 This issue has been resolved in version 13.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants