title: Angular ui-router onEnter function not firing
body: <p>Thanks to some great help from the SO community, I have a working angular SPA that uses multiple states/views using the <a href="https://github.com/angular-ui/ui-router" rel="nofollow">ui-router</a> library. However I am getting a behavior that seems at odds with the <code>angular-ui-router</code> documentation.</p>
  
  <p>From their docs about <a href="https://github.com/angular-ui/ui-router/wiki#onenter-and-onexit-callbacks" rel="nofollow">onEnter</a>, I would expect that anytime I use <code>$state.go("home")</code>, the <code>onEnter()</code> event tied to that state's config object would kick off, yet I don't see it happen. Example:</p>
  
  <pre><code>/* myApp module */
  var myApp = angular.module('myApp', ['ui.router'])
  .config(['$stateProvider', function ($stateProvider) {
  
  $stateProvider.state('home', {
      url: "/",
      views: {
          'top': {
              url: "",
              template: '&lt;div&gt;top! {{topmsg}}&lt;/div&gt;',
              controller: function ($scope) {
                  $scope.topmsg = "loaded top!";
                  console.log("top ctrl!");
              },
              onEnter: function () {
                  console.log("entered bottom state's onEnter function");
              }
          },
          'middle': {
              url: "",
              template: '&lt;div&gt;middle! {{middlemsg}}&lt;/div&gt;',
              controller: function ($scope) {
                  $scope.middlemsg = "loaded middle!";
                  console.log("middle ctrl!");
              },
              onEnter: function () {
                  console.log("entered bottom state's onEnter function");
              }
          },
          'bottom': {
              url: "",
              template: '&lt;div&gt;bottom! {{bottommsg}}&lt;/div&gt;',
              controller: function ($scope) {
                  $scope.bottommsg = "loaded bottom!";
                  console.log("bottom ctrl!");
              },
              onEnter: function () {
                  console.log("entered bottom state's onEnter function");
              }
          }
      },
      onEnter: function () {
          console.log("entered home state");
      }
    });
  }])
  .controller('MyAppCtrl', function ($scope, $state/*, $stateParams*/) {
      $scope.statename = $state.current.name;
      $scope.testmsg = "app scope working!";
      console.log("MyAppCtrl initialized!");
      $state.go("home");
  });
  </code></pre>
  
  <p>As you can see from all the <code>onEnter()</code> calls in the state's config objects, my expectation was that when the home state loads, I would start to see a list of all the states/views they were hitting firing off their console messages. However, only the very first <code>entered home state</code> message is being logged, from the <code>home</code> state's <code>onEnter</code> event. Not a single other view's <code>onEnter</code> is being hit. Am I misreading the docs?</p>
  
  <p><a href="http://jsfiddle.net/7tzXh/5/" rel="nofollow">Here is a long-awaited fiddle</a> to demonstrate. Just show the console in firebug/chrome devtools and you will see the lack of console output.</p>
  
  <p>Any help would be great. I'm using angular 1.2 and ui-router 0.2.0. Thanks in advance!</p>