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