title: $timeout not working in angular.js
body: <p>i am using <code>$timeout</code> in my controller but its not working!</p>
  
  <pre><code>app.controller("Friendsrequests",['$http','$log','$location','$timeout','$scope', function($http,$log,$location,$timeout,$scope){
  //getting base url of application
  this.baseUrl = function() {
          var base_url = window.location.origin;
  
          var pathArray = window.location.pathname;
          return base_url;
      //  return base_url+pathArray;
                  };
  // assigning to a variablebase_url('login/f_request');
  var ThroughUrl = this.baseUrl()+'/keon/login/f_request';
  
  
  //declare a variable
  var ata = this;
  ata.notifications = [ ] ;
  ata.counts=' ';
  //sending ajax request
   function getNotifications()
  {
  $http({method: 'POST', url: ThroughUrl,})
  .success(function(data) {
      // this callback will be called asynchronously
      // when the response is available
  
  //assign data to the variable
  ata.notifications=data;
  ata.counts =data.length;
  
    }).
    error(function(data, status, headers, config) {
      // called asynchronously if an error occurs
      // or server returns response with an error status.
    });
  
  }
  
  $timeout(function() {
      getNotifications();
  }, 1000);
  
  }]);
  </code></pre>
  
  <ul>
  <li>what is the issue .</li>
  </ul>