title: Angular JS viewContentLoaded loading twice on initial homepage load
body: <p>I noticed that on my initial homepage load, my viewContentLoaded is firing twice, why is that ?</p>
  
  <pre><code>app.run(function 
      ($rootScope,$log) {
        'use strict';
        $rootScope.$state = $state;
        $log.warn("gets here");
  
        $rootScope.$on('$viewContentLoaded',function(){
          $log.warn("gets here2");
        });
      });
  </code></pre>
  
  <p>Output on page load</p>
  
  <pre><code>"gets here" 
  "gets here2" 
  "gets here2"
  </code></pre>
  
  <p>And my routing as follows</p>
  
  <pre><code>$urlRouterProvider.when('', '/');
  
    // For any unmatched url, send to 404
    $urlRouterProvider.otherwise('/404');
  
    $stateProvider
      .state('home', {
        url: '/',
        templateUrl: 'views/search.html',
        controller: 'SearchCtrl'
      })
  </code></pre>
  
  <p>My Index.html</p>
  
  <pre><code>  &lt;div id="canvas"&gt;
      &lt;ng-include src="'views/partials/header.html'"&gt;&lt;/ng-include&gt;
      &lt;!-- container --&gt;
      &lt;div ui-view &gt;&lt;/div&gt;
      &lt;!-- /container --&gt;
      &lt;ng-include src="'views/partials/footer.html'"&gt;&lt;/ng-include&gt;
    &lt;/div&gt;
  </code></pre>