title: How to define a route for Iron Router in a smart package
body: <p>I am using iron:router@1.0.0-pre3 with meteor 9.3.1.</p>
  
  <p>I am creating a smart package. I want to define routes inside the smart package and not in the main app.js file.</p>
  
  <p>I tried adding following code in the .js file for smart-package:</p>
  
  <pre><code>Router.route('/path', function () {
    this.render('someTemplate');
  });
  </code></pre>
  
  <p>The above code gives a "Router not defined" error. Don't know what should be added to "api.use" in "Package.onUse(function(api)" for Iron:Router in the "package.js" file.</p>
  
  <p>Is it possible to define routes inside smart-package? How can I do this?</p>
  
  <p><strong>Update</strong>:</p>
  
  <p>After adding <code>iron:router</code> to <code>api.use</code> the "Router not defined" error is gone.</p>
  
  <p>However, the route is still not working. I have added the route in <code>mypack.js</code>. <strong><code>mypack.js</code> is only available to client.</strong></p>
  
  <pre><code>Package.onUse(function(api) {
    api.versionsFrom('METEOR@0.9.3.1');
    api.use(['iron:router', 'templating'], 'client');
    api.addFiles(['mypack.js', 'mypack.html'], 'client');
  });
  </code></pre>