title: Passing Username to Router Parameters
body: <p>So I'd like to create a user profile listing the posts a user has made. My problem is passing each username through the router and onto Meteor.publish/subscribe. I keep getting "username undefined" </p>
  
  <p>I suppose my question is: how does Iron Router know what "this.params.username" are? Should the url provide that?</p>
  
  <p>Router</p>
  
  <pre><code>Router.route('userProfile',{
     path: '/:username',
     waitOn: function () {
       return Meteor.subscribe('userprofile', this.params.username)},
     data: function () {return {posts:Posts.find({username: this.params.username})};},
  });
  </code></pre>
  
  <p>Meteor.publish</p>
  
  <pre><code>Meteor.publish('userprofile', function () {
    return Posts.find({username: this.params.username});
  });
  </code></pre>
  
  <p>Template</p>
  
  <pre><code>&lt;template name="userProfile"&gt;
   &lt;div class="posts"&gt;
    {{#each posts}}
     {{&gt; postItem}}
    {{/each}}
   &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>