错误:jslint在这里由于循环不良而给我错误

问题描述 投票:0回答:1
$http({
  method: 'POST',
  datatype: 'json',
  url: '/CreateUser',
  data: data
  cache: false
}).success(function(data) { //Error:jslint gives me error here for bad looping
  console.log(data.message);
}).error(function(error) {
  console.log(error.message);
});

我在Atom编辑器中使用jslint包,在其中传递回调响应给了我错误Error:jslint在这里给了我错误循环的错误这是什么?有人可以向我解释吗?

javascript angularjs jslint
1个回答
2
投票

您在成功回调中有两个}

$http({
    method: 'POST',
    datatype:'json',
    url: '/CreateUser',
    data:data
    cache: false
}).success(function (data){
    console.log(data.message);
}).error(function (error){
    console.log(error.message);
});
© www.soinside.com 2019 - 2024. All rights reserved.