Javascript Angular Strap$alert给出非函数错误-不知道原因

Javascript Angular Strap$alert给出非函数错误-不知道原因,javascript,angularjs,twitter-bootstrap,angular-strap,Javascript,Angularjs,Twitter Bootstrap,Angular Strap,我正在尝试使用Angular Strap插件为用户创建消息,如下所示: 还有下面的plunker 我确信我已经正确地添加了module.config,因为这一切都没问题,但是在我的控制器中,当我将$alert变量注入我的函数时,我得到了一个错误。以下是错误: TypeError: object is not a function at AlertFactory (http://localhost:3000/components/angular-strap/dist/angular-str

我正在尝试使用Angular Strap插件为用户创建消息,如下所示:

还有下面的plunker

我确信我已经正确地添加了module.config,因为这一切都没问题,但是在我的控制器中,当我将$alert变量注入我的函数时,我得到了一个错误。以下是错误:

TypeError: object is not a function
    at AlertFactory (http://localhost:3000/components/angular-strap/dist/angular-strap.js:412:18)
    at new <anonymous> (http://localhost:3000/controllers/form-controller.js:92:17)
我是这样注射的:

angular.module('MyApp')
.controller('formController', ['$scope', 'Appointment', '$alert',  function($scope, Appointment, $alert) {
console.log($alert);

}]);
仅供参考-components/angular-strap/dist/angular-strap.js:412:18==$alert=$modaloptions,这让我觉得$module没有加载,但应该加载其余的angular-strap没有


有人能帮忙吗?

Hmm,也许是我,但我似乎没有看到错误?除了html上丢失的开始标记外,自定义警报弹出得很好。是的-我认为这个问题与UI路由器状态有关-我使用嵌套状态,我认为这是导致问题的原因,但不确定如何
angular.module('MyApp')
.controller('formController', ['$scope', 'Appointment', '$alert',  function($scope, Appointment, $alert) {
console.log($alert);

}]);