title: Angular UI router - access state params in parent
body: <p>I have an Angular App using the great ui-router.</p>
  
  <p>My setup looks like:</p>
  
  <pre><code>.config( function ($stateProvider, $urlRouterProvider) {
  
      $stateProvider
  
      // PROJECT DETAIL
      .state('project', {
          url: '/project/:projectId/',
          resolve: {
              /* some base api calls */
          },
          views: {
              'task-list': {
                  templateUrl: 'partials/task_list.tmpl.html',
                  controller: 'TaskListCtrl',
                  resolve: {
                      tasks: function ($stateParams, ConcernService) {
                          return ConcernService.get('project-tasks/', $stateParams.projectId);
                      },
                  }
              },
              'concern-instance': {
                  /* some resolved variables */
              }
          }
      })
      .state('project.task', {
          url: 'task/:taskId/',
          views: {
              'concern-instance@': {
                  /* some different resolved variables */
              },
          }
      })
  </code></pre>
  
  <p>This all works like butter. However in my <code>task_list</code> template when in state <code>project.task</code>, I want to be able to access the <code>taskId</code> param so I can highlight active nav links, even when the url is <code>#/project/123/task/456/</code> the <code>taskId</code> is empty. I understand that this is because templates only have access to params declared for that state. So if I want to get the <code>taskId</code> in the <code>project.task</code> state, how should I do it? Do I need to re-declare the <code>task-list</code> in <code>project.task</code>?</p>