add süße wachsame eckige js

Ich bin neu bei AngularJS und versuche, das süße Benachrichtigungs-Plugin von @ zu verwendehttps: //github.com/oitozero/ngSweetAler, Ich habe meinem index.html bereits die entsprechenden Skripte hinzugefügt:

index.html

<link rel="stylesheet" href="bower_components/sweetalert/dist/sweetalert.css">
<script src="bower_components/angular-sweetalert/SweetAlert.min.js"></script>
<script src="bower_components/sweetalert/dist/sweetalert.min.js"></script>

ie die documentacion sagt. Jetzt in meinem ctrl.js Ich habe das

var ctrl = function ($scope, SweetAlert) {

    SweetAlert.swal("Here's a message"); // this does not work
}

ctrl.$inject = ['$scope', 'oitozero.ngSweetAlert];

angular.module('myApp.missolicitudes.controllers',
    [
       'oitozero.ngSweetAlert'
    ])
    .controller('MiSolicitudCtrl', ctrl);

Aber es funktioniert nicht, in meinem Browser habe ich diesen Fehler von den Entwicklertools erhalten:

Error: [$ injector: unpr]http: //errors.angularjs.org/1.4.3 $ injector / unpr? p0 = oitozero.ngSweetAlertProvider% 20% 3C - "" itozero.ngSweetAlert% 20% 3C-% 20MiSolicitudCtrl at Error (native) athttp: // localhost: 8081 / assets / libs / angular / angular.min.js: 6: 416 beimhttp: // localhost: 8081 / assets / libs / angular / angular.min.js: 40: 375 at Object.d [as get] http: // localhost: 8081 / assets / libs / angular / angular.min.js: 38: 364) beimhttp: // localhost: 8081 / assets / libs / angular / angular.min.js: 40: 449 at d http: // localhost: 8081 / assets / libs / angular / angular.min.js: 38: 364) aß http: // localhost: 8081 / assets / libs / angular / angular.min.js: 39: 124) bei Object.instantiate http: // localhost: 8081 / assets / libs / angular / angular.min.js: 39: 273) at $ get http: // localhost: 8081 / assets / libs / angular / angular.min.js: 80: 228) unter link http: // localhost: 8081 / assets / libs / angular / angular-route.min.js: 7: 268)

Wie kann ich dieses Plugin korrekt implementieren?

Update 1

Ich habe diesen Vorschlag von @Pankaj Parkar und @Mike G @ bereits ausprobier

ctrl.$inject = ['$scope', 'oitozero.ngSweetAlert'];

und wie folgt

ctrl.$inject = ['$scope', 'SweetAlert'];

Meine Entwicklertools geben folgende Meldung aus:

Error: [$injector:unpr] http://errors.angularjs.org/1.4.3/$injector/unpr?p0=oitozero.ngSweetAlertProvider%20%3C-"<div class="container ng-scope" ng-view="">"itozero.ngSweetAlert%20%3C-%20MiSolicitudCtrl
at Error (native)
at http://localhost:8081/assets/libs/angular/angular.min.js:6:416
at http://localhost:8081/assets/libs/angular/angular.min.js:40:375
at Object.d [as get] (http://localhost:8081/assets/libs/angular/angular.min.js:38:364)
at http://localhost:8081/assets/libs/angular/angular.min.js:40:449
at d (http://localhost:8081/assets/libs/angular/angular.min.js:38:364)
at e (http://localhost:8081/assets/libs/angular/angular.min.js:39:124)
at Object.instantiate (http://localhost:8081/assets/libs/angular/angular.min.js:39:273)
at $get (http://localhost:8081/assets/libs/angular/angular.min.js:80:228)
at link (http://localhost:8081/assets/libs/angular/angular-route.min.js:7:268)

Antworten auf die Frage(8)

Ihre Antwort auf die Frage