angular1.5.7学习过程中控制台输出$q is not defined

我跟着教程学angularjs,跟教程一样组织代码后访问页面报错如下:

angular.js:13708 ReferenceError: $q is not defined
    at handleRequest (news.client.service.js:8)
    at Object.list (news.client.service.js:27)
    at Scope.NewsController.$scope.loadNews (news.client.controller.js:9)
    at new NewsController (news.client.controller.js:18)
    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)

源代码:

https://img4.mukewang.com/5ba34bd800018acc05550434.jpg

https://img2.mukewang.com/5ba34be100014cf504260168.jpg

请问如何处理,新手轻拍。。。


月关宝盒
浏览 901回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript