Asqan
Asqan

Reputation: 4479

Unable to inject Ng-SweetAlert-2 in AngularJS

It is about this project

I have followed the install process given in the description but I'm getting error:

Error: [$injector:unpr] Unknown provider: 19degrees.ngSweetAlert2Provider <- 19degrees.ngSweetAlert2 <- prkctrl`

I have included sweetalert.js (original sweetalert), sweetalert2 (extended version) and ngsweetalert2 (coming from this project).

I still dont see what is the reason? Name can be an issue?

Upvotes: 1

Views: 1010

Answers (1)

Shashank Agrawal
Shashank Agrawal

Reputation: 25797

Make sure you have added the module 19degrees.ngSweetAlert2 to your main application like:

angular.module('myApp', ['19degrees.ngSweetAlert2', /* and other modules */]

Upvotes: 2

Related Questions