title: Angularjs pass ui-router controller $scope to data
body: <p>i want to pass a <code>pageTitle</code> data from ui-router based on a <code>$stateParams</code> and then update the title of the page using a directive</p>
  
  <p>ui-router example:</p>
  
  <pre><code>.state('index.something.detail', {
          url: '/{type}/{else}',
          views: {
              '': {
                  templateUrl: 'tempalte.html',
                  controller: function($scope, $stateParams) {
                      if ($stateParams.type == "param") {
                          $scope.title = "param";
                      }
                  }
              }
          },
          data: {
              pageTitle: 'Something {{title}}', //NOT WORKING
          },
          ncyBreadcrumb: {
              label: 'Sometgin {{title}}', //IT WORKS
              parent: 'index.something'
          }
      })
  </code></pre>
  
  <p>directive example:</p>
  
  <pre><code>function pageTitle($rootScope, $timeout) {
      return {
          link: function(scope, element) {
              var listener = function(event, toState, toParams, fromState, fromParams) {
                  // Default title - load on Dashboard 1
                  var title = 'APP';
                  // Create your own title pattern
                  if (toState.data &amp;&amp; toState.data.pageTitle) title = 'APP | ' + toState.data.pageTitle;
                  $timeout(function() {
                      element.text(title);
                  });
              };
              $rootScope.$on('$stateChangeStart', listener);
          }
      }
  };
  </code></pre>
  
  <p>angular-breadcrumb pass the data ok</p>
  
  <blockquote>
    <p>Something param</p>
  </blockquote>
  
  <p>but in the pageTitle directive i get</p>
  
  <blockquote>
    <p>Something {{title}}</p>
  </blockquote>
  
  <p>how can i pass the $scope of the ui-router state?</p>
  
  <p>Thanks!</p>