明月笑刀无情
一些简单GET请求的代码示例。也许这有助于理解不同之处。使用then:$http.get('/someURL').then(function(response) {
var data = response.data,
status = response.status,
header = response.header,
config = response.config;
// success handler}, function(response) {
var data = response.data,
status = response.status,
header = response.header,
config = response.config;
// error handler});使用success/error:$http.get('/someURL').success(function(data, status, header, config) {
// success handler}).error(function(data, status, header, config) {
// error handler});