跟着中文文档走了一下,出现的问题记录一下。
由于版本问题,$http请求函数不一致
$http.jsonp(url).success//报错 is not a function
在1.6版本后只存在.then方法
$http.jsonp(url).then(function A(){},function B(){});
A为成功后执行的函数,B为失败后执行的函数
跟着中文文档走了一下,出现的问题记录一下。
由于版本问题,$http请求函数不一致
$http.jsonp(url).success//报错 is not a function
在1.6版本后只存在.then方法
$http.jsonp(url).then(function A(){},function B(){});
A为成功后执行的函数,B为失败后执行的函数