title: Send data outside the factory real time using angularjs interceptor
body: <p>I want to solve on how to use <code>$scope.time</code> to my html.
  I want to show in UI the time the last http request but gives me an error.
  I cant use <code>$scope</code>. </p>
  
  <p>I Have these codes:</p>
  
  <pre><code>module.factory('timestamp', [function ($scope) { 
  var time = {
      request: function (config) {
  
          $scope.time = new Date().getTime(); //wanted to show in UI realtime
          return config;
      }
      //,response: function (response) {
      //    response.config.responseTimestamp = new Date().getTime();
      //    return response;
      //}
  };
  return time;}];
  </code></pre>
  
  <p>Config:</p>
  
  <pre><code>module.config(function ($httpProvider) {
  $httpProvider.interceptors.push('timestamp');}
  </code></pre>