【发布时间】:2016-11-24 06:41:30
【问题描述】:
我正在尝试将Toastr 与angular js 一起使用,但出现以下错误。我按预期包含了jquery.js 文件。
src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"
错误信息:
angular.js:11594 TypeError: Cannot read property 'extend' of undefined
在 m (toastr.js:474)
在 Object.o [作为信息] (toastr.js:474)
在 ProductTableController.showAddToCartToast (productTable.directive.js:207)
在 ProductTableController.addToCart (productTable.directive.js:159)
在 angular.js:12332
在 f (angular.js:22949)
在 a.$$ChildScope.$$ChildScope.$eval (angular.js:14383) 在 a.$$ChildScope.$$ChildScope.$apply (angular.js:14482) 在 HTMLButtonElement。 (angular.js:22954) 在 HTMLButtonElement.dispatch (jquery.js:4670)(匿名函数) @ angular.js:11594(匿名函数) @ angular.js:8544$apply @ angular.js:14484(匿名函数) @ angular.js:22954dispatch @ jquery.js:4670r.handle@jquery.js:4338
知道有什么问题吗?
谢谢。
【问题讨论】:
-
您在控制台中遇到任何错误?
-
不,只是我在问题中添加的那个。
标签: javascript angularjs toastr