title: Manually invoke $q in AngularJS
body: <p>From what I understand about <code>$q</code> in AngularJS it is run everything I refresh my page. This is similar to putting a function in <code>ng-init</code>.</p>
  
  <p>Below is <code>my $q.all</code> code;</p>
  
  <pre><code>$q.all([$scope.getCart(), $scope.getCategory(), $scope.getMenu(), $scope.getRestaurant()]).then(function(data){
      $scope.cart = data[0].cart;
      $scope.cartItems = data[0].cartItems;
      $scope.delDay = data[0].delDay;
      $scope.delTime = data[0].delTime;
      $scope.cat = data[1];
      $scope.itemData = data[2];
      $scope.rest = data[3];
  });
  </code></pre>
  
  <p>As you can see all the functions are called everytime I refresh a page and I get my data added to my <code>$scope</code>. This works as expected..</p>
  
  <p>My question is how can I invoke <code>$q</code> through another function like below;</p>
  
  <pre><code>$scope.notEnoughTime = function () {
     if (year = 2015) {
      // invoke $q manually thereby calling 
      // all the functions and updating all the data in my scopes
     }
  }
  </code></pre>