title: Meteor: Different (iron-)routes for Cordova and Website
body: <p>I want to build a Service with the Smartphone-App differing from the Website or WebApp respectively.
  My idea was to have different routing tables in iron router, like so:</p>
  
  <p>/client</p>
  
  <ul>
  <li>routes.js</li>
  </ul>
  
  <p>/cordova</p>
  
  <ul>
  <li>routes.js</li>
  </ul>
  
  <p>...</p>
  
  <p>Additionally the files could be enclosed by "if (Meteor.isCordova) {" and "if (Meteor.isClient) {" brackets.</p>
  
  <p>So far I tried this:</p>
  
  <pre><code>Router.map(function() {
    if (Meteor.isCordova) {
      this.route('homeCordova', {
        path: '/'
      });
    }
  
    if (Meteor.isClient) {
      this.route('homeWeb', {
        path: '/'
      });
    }
  }
  </code></pre>
  
  <p>and it works for the paths, but not for the layout, so</p>
  
  <pre><code>if (Meteor.isCordova) {
      Router.configure({
        layoutTemplate: 'mainLayoutCordova',
        loadingTemplate: 'loadingCordova',
  ...
  
    if (Meteor.isClient) {
      Router.configure({
        layoutTemplate: 'mainLayout',
        loadingTemplate: 'loading',
  ...
  </code></pre>
  
  <p>doesn't go.</p>
  
  <p>As an alternative I could have two different Meteor-Apps running at the same time on my server? Does that make any sense?</p>
  
  <p>Any idea how to fix it or how to solve this issue?</p>
  
  <p>The example-app localmarket only has the smartphone app, so only 1 router.js file, also verso, if you're logged in, the WebApp looks pretty much the same as on the phone.</p>
  
  <p>Regards</p>