I am using $http.post to get the data from node.js server. I want to handle the delay.
I had added timeout as $http.defaults.timeout = 100; and expected to console.log the delay in error but it is not working.
Example:
$http.defaults.timeout = 100;
$http.post(url, data).success(function(result) {
callback(result);
}).error(function(error) {
console.log("error");
});
I am new to AngularJS. Any help will be grateful.