title: nested state in angular js gives TypeError
body: <p>I have two states, one abstract parent and the other child. Nothing fancy,</p>
  
  <pre><code>var app = angular.module('starter', ['ionic'])
  .config(function($stateProvider, $urlRouterProvider) {
    $stateProvider
        .state('navBar', {
          url: "/navBar",
         abstract: true,
       views: {
            'navBarView': {
          templateUrl: "templates/navigationBar.html",
           controller:'AppCtrl'
         }
       }
  
  
        })
         .state('navBar.orderReceive', {
          url: "/orderReceive",
          views: {
            'orderReceiveView': {
              templateUrl: "templates/OrderReceiveChoice.html"
  
  
            }
          }
        })
  
          $urlRouterProvider.otherwise(function ($injector) {
             var $state = $injector.get('$state');
             $state.go('navBar.orderReceive');
  
          });
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>.controller('AppCtrl', ['$scope','$state','$stateParams','$rootScope', function($scope,$state,$stateParams,$rootScope){
               }]);
  </code></pre>
  
  <p>I get TypeRrror: Can not read property controller of undefined. I have the  controller that in fact is getting initialized. What does really look wrong with it?</p>
  
  <p>Also, If I remove the nested state, it works fine without any errors.But I need nested state.
  Error looks like this:</p>
  
  <pre><code>TypeError: Cannot read property 'controller' of undefined
      at IonicModule.controller.self.update (ionic.bundle.js:51695)
      at IonicModule.controller.self.beforeEnter (ionic.bundle.js:52135)
      at IonicModule.controller.self.beforeEnter (ionic.bundle.js:54079)
      at Scope.$get.Scope.$emit (ionic.bundle.js:24919)
      at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.emit (ionic.bundle.js:50634)
      at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.transition (ionic.bundle.js:50492)
      at ionic.bundle.js:52121
      at ionic.bundle.js:50370
      at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.render (ionic.bundle.js:50459)
      at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.init (ionic.bundle.js:50369)
  </code></pre>