title: Cant access a scope variable outside restangular request
body: <p>The rest api returns a json object on restangular get request and the response is only accessible inside the function</p>
  
  <pre><code> Restangular.all('getUsers').getList().then(function(response) {
      $scope.users = response;
      angular.forEach($scope.users, function(value, key) {    //This works
          console.log(key + ': ' + value);
      });
    });
  
    angular.forEach($scope.users, function(value, key) {    //This does not work
          console.log(key + ': ' + value);
      });
  </code></pre>