title: Meteor template helper not working after using iron router
body: <p>I'm new to Meteor and I just installed iron router to my project. I have this inside my <strong>application.js</strong> file:</p>
  
  <pre><code>if (Meteor.isClient) {
  
    Template.nav.helpers({
      isMobile: function(){
        if(isMobile.tablet) {
          return false;
        } else if(isMobile.phone) {
          return true;
        } else {
          return false;
        }
      }
    });
  
  }
  </code></pre>
  
  <p>The <code>isMobile</code> helper will be used inside my <code>nav</code> template like this:</p>
  
  <pre><code>&lt;template name="nav"&gt;
  ...
    {{#if isMobile}}
      {{&gt; mobile_nav}}
    {{else}}
      {{&gt; desktop_nav}}
    {{/if}}          
  ...
  &lt;/template&gt;
  </code></pre>
  
  <p>What I'm doing here is, I'm loading 2 different sets of navigation. If the user is using desktop or tablet, I'm going to show <code>desktop_nav</code> template and when the user is using phone, I'm going to show <code>mobile_nav</code>.</p>
  
  <p><a href="https://github.com/kaimallea/isMobile" rel="nofollow">This is the jQuery plugin</a> that I use inside the <code>isMobile</code> template helper.</p>
  
  <p>Inside my <strong>application.html</strong> file, I have this:</p>
  
  <pre><code>&lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /&gt;
      &lt;title&gt;Example&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;/body&gt;
  
  &lt;template name="main"&gt;
      {{&gt; nav}}   
          {{&gt; yield}}
      {{&gt; footer}}
  &lt;/template&gt;
  </code></pre>
  
  <p>And this is my <strong>router.js</strong> file:</p>
  
  <pre><code>Router.configure({
      layoutTemplate: 'main'
  });
  
  Router.route('/', 'home');
  
  Router.route('/about', 'about');
  </code></pre>
  
  <p>My problem right now is, the <code>isMobile</code> template helper doesn't work. The <code>nav</code> template is loaded but the <code>if else</code> block is not working.</p>
  
  <p>It was working fine before I start using iron router.</p>
  
  <p>What am I missing here?</p>
  
  <p>Note, this is my project structure tree:</p>
  
  <pre><code>├── application.css.scss
  ├── application.html
  ├── application.js
  ├── client
  │   ├── javascripts
  │   │   ├── isMobile.min.js
  │   │   └── router.js
  │   ├── stylesheets
  │   │   └── ...
  │   └── views
  │       ├── about.html
  │       ├── home.html
  │       ├── home.js
  │       └── layouts
  │           ├── desktop_nav.html
  │           ├── footer.html
  │           ├── mobile_nav.html
  │           └── nav.html
  └── public
      ├── fonts
      │   └── ...
      └── images
          └── ...
  </code></pre>