title: Controller for views in a state
body: <p>I'm trying to define a controller within an abstract state so that I can have a single controller for all my views but the functions inside controller are not getting called if the controller is defined outside.</p>
  
  <pre><code>.state('update', {
          url : '/update',
          abstract: true,
          template: '&lt;ui-view/&gt;',
          controller : function($scope) {   //works
              $scope.hello = function() {
                  alert("hello");
              }
          }
          controller : 'updateController'  // Doesn't work
      })
      .state('update.detail', {
          url : '/view/:id',
          views : {
              "" : {
                  templateUrl : 'update-detail.html'
              },
  
              "header@update.detail" : {
                  templateUrl : 'header.html'
              },
              "genericnavigation@update.detail" : {
                  templateUrl : 'generic-navigation.html'
              },
              "mnavigation@update.detail" : {
                  templateUrl : 'mobile-navigation.html'
              },
              "updatecontent@update.detail" : {
                  templateUrl : 'update-content.html'
              }
          }
      })
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>header.html
   &lt;div ng-click="hello();"&gt;&lt;/div&gt;  //Click event doesn't get fired for ( controller : 'updateController' )
  
  
  app.controller('updateController', ['$scope', '$state', function($state, $scope) {
   console.log("inside update")
   $scope.hello = function() {
          alert("hello");
   }
  }]);
  </code></pre>