title: Meteor: getting route param on page loading
body: <p>Here is my issue:
  I am trying to make an API call when loading my page to load one entity, saving few of this entity attributes into the session - so I basically make one call, and use the attributes whenever I need them.</p>
  
  <p>But when I try to get the id param from the Route, the <code>Router.current()</code> at the beginning of my script, it is null.</p>
  
  <p>On the other hand, when I call the same <code>Router.current()</code> on a <code>helper</code>, I can get my param.</p>
  
  <p>Any idea what is wrong / how can I get this param before calling my <code>helpers</code> ?</p>
  
  <p>Here is my html where I will be using one of this attribute:</p>
  
  <pre><code>&lt;input type="text" name="name" id="addCampaignInputName" value="{{currentCampaignName}}" placeholder="New Campaign Name"&gt;
  </code></pre>
  
  <p>And the JS:</p>
  
  <pre><code>if (Meteor.isClient) 
  {
    $(function () {
    console.log( Router.current());   ==&gt;&gt; NULL
      if( Router.current() !== null) {
         Meteor.call("getApiCampaignsById", Router.current().params.id, function(error, results) {
           Session.set('currentCampaignDetailsName', results.data.name);
           Session.set('currentCampaignDetailsTrackingMethod', results.data.tracking_method_id);
           Session.set('currentCampaignDetailsCampaignTypeId', results.data.campaign_type_id);
        });
      }
    });
  
    Template.addCampaign.helpers({
       currentCampaignName: function() {
         console.log( Router.current());   ===&gt;&gt; DUMP DATA
         return Session.get('currentCampaignDetailsName');
       },
     });
   }
  </code></pre>