AngularJS 报错: $http(...).success is not a function
来源:互联网 发布:淘宝网服务中心 编辑:程序博客网 时间:2024/06/10 22:58
在使用Angular 1.6版本的
异常代码如下:
$http({ url: './stars.php', method: 'get'}).success(function (info) { $log.info(info); $scope.stars = info;});
查询了原因,是新版本的AngularJs中取消了success和error,用promise规则。
$http({ url: './stars.php', method: 'get'}).then(function ( info ){ $scope.stars = info;})
阅读全文
0 0
- AngularJS 报错: $http(...).success is not a function
- angualrJS跨域请求数据,老是报错: $http.jsonp(...).success is not a function
- Angular 1.6提示$http.get(...).success is not a function
- angular 1.6 $http.get(...).success is not a function 解决办法
- Angular 1.6提示$http.get(...).success is not a function
- 解决 $http.get(...).success is not a function问题
- Angularjs 报错 Argument 'MyController' is not a function, got undefined
- js 报错 $ is not a function
- js报错:****is not a function 的解决方法
- js报错$('#form1').ajaxSubmit is not a function...
- js报错$('#form1').ajaxSubmit is not a function...
- Extjs 报错 this.addEvents is not a function
- js报错:TypeError: document.GetElementById is not a function
- js报错 :TypeError: yanzhengma is not a function
- js报错:TypeError: document.GetElementById is not a function
- ajaxFileUpload报错jQuery.handleError is not a function
- animate is not a function(zepto 使用报错)
- intermediate value is not a function报错解决方法
- qt事件循环(exec)
- firefox 47以上版本,需要下载第三方driver,即geckodriver
- PHP学习路线图
- git操作GitHub
- Linux学习笔记
- AngularJS 报错: $http(...).success is not a function
- break与continue标签的使用
- isDebugEnabled作用
- Beyond Compare
- #if 0 end if作用:->系统剪裁
- 为什么要使用代理模式?
- 一分钟理解乐观锁和悲观锁,附深入理解乐观锁与悲观锁
- 十款最新的JavaScript开发工具
- 《Python数据分析与挖掘实战》笔记(四):数据预处理