title: getting parameter value from nested routes
body: <p>I have my router set like :</p>
  
  <pre><code>this.resource('analytics', {path: '/analytics'}, function(){
      this.resource('analyticsRuns', {path: ':exerciseRunId/analyticsRuns'},function(){
          this.resource('analyticsRun',{path: ':runId'});
      });
  });
  </code></pre>
  
  <p>I jump to 'analyticsRuns' route using :</p>
  
  <pre><code>this.transitionToRoute('analyticsRuns',{"exerciseRunId":this.get('selectedExerciseRun.id')});
  </code></pre>
  
  <p>And my AnalyticsRunsIndexRoute is defined as :</p>
  
  <pre><code>AS.AnalyticsRunsIndexRoute = Ember.Route.extend({
  model : function(params) {
      var store = this.get('store');
       //console.log(params); //returns empty object
      //var exerciseRunId = AS.Analytics.get('exerciseRunId');
      exerciseRunId = 577;
      if(!(exerciseRunId)){
          this.transitionTo('analytics');
      }
  
      store.find('analyticsRun',{'exerciseRunId':exerciseRunId});
      return store.filter('analyticsRun', function(analyticRun){
          return analyticRun.get('exerciseRunId') == exerciseRunId;
      });
  
  
  },
  setupController : function(controller,model){
      this._super(controller,model);
      this.controllerFor('analysisTemplates').set('model',controller.get('store').find('analysisTemplate'));
  }
  </code></pre>
  
  <p>});</p>
  
  <p>I was wondering if I could access ":exerciseRunId" value in the AnalyticsRunsIndexRoute. Currently there isnothing set when I check the params arguments passed to this routes' model. On refresh however, the parameter becomes available to the AnalyticsRunRoute but <strong>only on refresh</strong>. So do I have to play with stateManagement to get the parameter value? or is there simpler way to access it. Thanks.</p>
  
  <p><strong>SOLUTION :</strong></p>
  
  <p>Again lots of thanks to Jeremy for walking through this. Here is how I have set up things now :</p>
  
  <p>I defied routes like :</p>
  
  <pre><code>AS.AnalyticsRunsRoute = Ember.Route.extend({
  model : function(params) {
      return params;
  }
  });
  
  
  AS.AnalyticsRunsIndexRoute = Ember.Route.extend({
  model : function(params) {
      var parentModel = this.modelFor('analyticsRuns');
      var exerciseRunId = AS.Analytics.get('exerciseRunId')||parentModel.exerciseRunId;
      var store = this.get('store');
  
      if(!(exerciseRunId)){
          this.transitionTo('analytics');
      }
  
      store.find('analyticsRun',{'exerciseRunId':exerciseRunId});
      return store.filter('analyticsRun', function(analyticRun){
          return analyticRun.get('exerciseRunId') == exerciseRunId;
      });
  
  },
  setupController : function(controller,model){
      this._super(controller,model);
      this.controllerFor('analysisTemplates').set('model',controller.get('store').find('analysisTemplate'));
  }
  });
  </code></pre>