0

I have function:

$scope.openNode = function (user) {

  var req = {
    method: 'GET',
    url: '/api/user/',
    headers: {
      'Content-Type': 'application/json'
    }
  };

  $http(req).then(function (response) {
    //smth do
  }, function () {

  });

};

I press the button this function is activated. If I poke again, then the request is repeated. How do I make the previous request canceled or ignored?

Bergi
  • 630,263
  • 148
  • 957
  • 1,375
Pal
  • 3
  • 4

0 Answers0