无法在 AngularJS 中注入 Ng-SweetAlert-2

Unable to inject Ng-SweetAlert-2 in AngularJS

大约this project

我已按照说明中给出的安装过程进行操作,但出现错误:

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

我已经包含 sweetalert.js(原始 sweetalert)、sweetalert2(扩展版本)和 ngsweetalert2(来自该项目)。

我还是不明白是什么原因?名字可能是个问题?

确保您已将模块 19degrees.ngSweetAlert2 添加到主应用程序中,例如:

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