$http.get(...).then(...).error is not a function
时间:2017-03-01 22:57:42
收藏:0
阅读:4020
1.6 新版本的AngularJs中用then和catch 代替了success和error,用PRomise规则。
更改写法:
1 $http.get(‘/api/user/showname2‘, { 2 3 }).then(function (result) { 4 5 alert(result.data); 6 7 }).catch(function (result) { 8 9 });
原文:http://www.cnblogs.com/junglexj/p/6486390.html
评论(0)