$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在这里给了我错误循环的错误这是什么?有人可以向我解释吗?
您在成功回调中有两个}
。
$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);
});