title: Accessing ui-router parent state views from child state
body: <p>I have some states defined like this:</p>
  
  <pre><code>$stateProvider.state('main.product', {
    url: '',
    abstact: true,
    views: {
      '': {
        templateUrl: 'product/index.html'
      },
      'sidebar': {
        templateUrl: 'product/sidebar.html'
      }
    }
  });
  
  $stateProvider.state('main.product.overview', {
    url: '/products/:product_id',
    templateUrl: 'product/overview.html',
    controller: 'ProductOverviewController'
  });
  </code></pre>
  
  <p>In my 'main wrapping' controller, i'd like to access the abstract states <code>views</code>, like this:</p>
  
  <pre><code>angular.module('myApp').controller('MainController', function($rootScope, $scope, $state, $stateParams) {
  
    console.log($state.$current.views.sidebar.templateUrl);
  
  });
  </code></pre>
  
  <p>This works if i'm in the parent state <code>main.product</code>. However, as expected, this returns undefined for the child state, <code>main.product.overview</code>.</p>
  
  <p>How can I access <code>views</code> from a child state?</p>
  
  <p>I know I could use a <a href="https://github.com/angular-ui/ui-router/wiki#attach-custom-data-to-state-objects" rel="nofollow">data object</a>, eg:</p>
  
  <pre><code>$stateProvider.state('main.product', {
    url: '',
    abstact: true,
    views: {
      '': {
        templateUrl: 'product/index.html'
      },
      'sidebar': {
        templateUrl: 'product/sidebar.html'
      }
    },
    data: {
       'sidebar': {
         templateUrl: 'product/sidebar.html'
       }
    }
  });
  </code></pre>
  
  <p>Then access like this:</p>
  
  <pre><code>console.log($state.current.data.sidebar.templateUrl)
  </code></pre>
  
  <p>But this is not clean, the <code>templateUrl</code> would be duplicated.</p>
  
  <p>Is it possible to access <code>views</code> from a child state?</p>