Reputation: 4433
$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);
});
I use jslint package in Atom Editor, where I pass callback response it gives me error Error:jslint gives me error here for bad looping what is this? Can someone explain to me?
Upvotes: 0
Views: 56
Reputation: 6009
you have two }
in the success callback.
$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);
});
Upvotes: 2