title: meteor.js - onReady callback for multiple subscriptions
body: <p>I'm in a situation where I need to have the full data from several subscriptions before my app can run properly. In a jQuery/Backbone.js context I would do something like this :</p>
  
  <pre><code>var sub1 = Meteor.subscribe('foo'),
  sub2 = Meteor.subscribe('bar');
  $.when(sub1, sub2, function(){
      // do things
  });
  </code></pre>
  
  <p>but I think this is not the Meteor way... (?) I could do something like this</p>
  
  <pre><code>Meteor.subscribe('foo', function(){
      Meteor.subscribe('bar', function(){
          // do things
      });
  });
  </code></pre>
  
  <p>but this quickly gets messy. There is probably some kind of helper/pattern for doing this and I just don't know it...</p>
  
  <p>NB - I am using the outstanding iron-router, and have also tried this :</p>
  
  <pre><code>this.route('baz', {
      // code ...
      'before' : [
          function(){
              this.subscribe('foo').wait();
          },
          function(){
              this.subscribe('bar').wait();
          }
       ],
       // more code ..
   });
  </code></pre>
  
  <p>but this doesn't seem to prevent downstream code from running, and so doesn't solve my problem...</p>