-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
ERROR TypeError: sweetalert_1.default is not a function #796
Comments
I found the error: I was importing it like the above code, as the documentation says but I had to import it with the following code: import * as sweetalert from 'sweetalert'; sweetalert("Hello world!"); I couldnt user "swal" alias for some reason. Typings I guess. This way works fine. |
bueno sirve pero me da ese error |
Same error. Nothing changes, even with @rafamds approach. His approach gives:
|
@seanmavley take a look at #799, this might be a duplicate of that issue. |
@lionralfs thanks for pointing out. I was just about to reference that issue in this thread. The #799 solution you presented is working fine here too. Thanks. |
Hi, my sweet alert modal is not showing and I'm getting this error on the console:
I'm using Angular v5 and SweetAlert 2.1.0.
I'm importing it with the following code:
And I'm trying to show a simple alert with the following code:
Any tips?
The text was updated successfully, but these errors were encountered: