Toastr 为 toastr.info('msg') 抛出 TypeError

Toastr throws TypeError for toastr.info('msg')

我正在试用 toastr,但我一直收到奇怪的 TypeError,这对我来说没有任何意义。

TypeError: Cannot read property 'extend' of undefined
at getOptions (http://localhost:3000/bower_components/toastr/toastr.js:391:25)

我用 yeoman gulp-angular 搭建了我的项目脚手架,并将 toastr 正确地注入到我想要测试它的控制器中。 我试过的行很简单:

toastr.info('A message.');

toastr 出现在页面中 - 由 gulp 任务插入。 如何找出这里出了什么问题?

jQuery 库可能不包含在内。 toastr getOptions 方法正在尝试扩展初始化 toastr 时传入的配置。