Parth Raval
Parth Raval

Reputation: 4433

Error: jslint gives me error here for bad looping

$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

Answers (1)

adam-beck
adam-beck

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

Related Questions