title: $viewContentLoading is not working
body: <blockquote>
    <p>I'm trying to log some value before content gets loaded. I'm using $viewContentLoading for this purpose which is getting called inside init function. But, value is not getting logged. Can anyone say what's wrong with my code.</p>
  </blockquote>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var app = angular.module('plunker', []);
  
  app.controller('MainCtrl', function($rootScope, $timeout, $q) {
    function init() {
    $rootScope.$on('$viewContentLoading', function(event, viewConfig)
  {
    alert("Hello");
    console.log(33)
  });
  }
  init();
  
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="plunker"&gt;
  
    &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;AngularJS Plunker&lt;/title&gt;
      &lt;link rel="stylesheet" href="style.css" /&gt;
      &lt;script src="http://code.angularjs.org/1.0.7/angular.min.js" data-semver="1.0.7"&gt;&lt;/script&gt;
      &lt;script src="app.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body ng-controller="MainCtrl"&gt;
    &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>