title: Is it possible for ngResource to be called synchronously?
body: <p>I currently have a factory which I'm using to retrieve a config file. </p>
  
  <pre><code>  m.factory('clientConfig', function($resource) {
      var r;
      r = $resource('assets/config.json', {}, {
        query: {
          method: 'GET'
        },
        isArray: false
      });
      return r.query();
    });
  </code></pre>
  
  <p>The config file is a json file which contains the location of a nodeJS server. In my local environment, the json file is</p>
  
  <pre><code>{
      "serverURL": "http://localhost\\:3000"
  }
  </code></pre>
  
  <p>When I start my app on the front page this is fine. The front page loads the clientConfig module, and any subsequent page just uses the clientConfig module like below without any problem</p>
  
  <pre><code>m.factory('House', function($resource, clientConfig) {
      return $resource(clientConfig.serverURL + '/houses/:houseId',
  ...
  </code></pre>
  
  <p>The problem I'm running into is if I enter the site on a page that immediately wants to load data from the server. In that case, because clientConfig is not populated yet and still empty and this stuffs up my $resource(clientConfig.serverURL + '/houses/:houseId' call.</p>
  
  <p>My question is is it possible to load up clientConfig synchronous or at least have my app not start until after clientConfig has been populated?</p>