错误描述:
TypeError: $http.get is not a function
at getAbc (abc.js:26)
at abc.js:18
at Scope.$emit (ionic.bundle.js:29441)
at Object.emit (ionic.bundle.js:55224)
at transitionComplete (ionic.bundle.js:55176)
at HTMLElement.completeOnTransitionEnd (ionic.bundle.js:55156)
at HTMLElement.eventHandler (ionic.bundle.js:16620)
解决方法可能不是适合所有人,方法如下:
报错代码:
.controller('powerController', ['$scope','showAlert' ,'pageInitService', '$http', '$state', function($scope,$http,showAlert,pageInitService,$state) {
正确代码:
$http顺序须一致。.controller('powerController', ['$scope','showAlert' ,'pageInitService', '$http', '$state', function($scope,showAlert,pageInitService,$http,$state) {