angular里 $location怎么会被显示undifinde

天崩地裂金刚不坏 2016-07-06 02:59:22
ReferenceError: $location is not defined
at new <anonymous> (app1.js:93)
at Object.invoke (angular.js:4709)
at $controllerInit (angular.js:10234)
at nodeLinkFn (angular.js:9147)
at compositeLinkFn (angular.js:8510)
at compositeLinkFn (angular.js:8513)
at publicLinkFn (angular.js:8390)
at angular.js:1756
at Scope.$eval (angular.js:17444)
at Scope.$apply (angular.js:17544)(anonymous function) @ angular.js:13708
...全文
195 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
谢谢,后来就解决了。真是要小心下行
街头小贩 2016-07-06
  • 打赏
  • 举报
回复
在你的代码中注入$location了吗

   app.directive('pagination',['calcTotal','$location',function(calcTotal,$location){
   });

87,909

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧