title: Is it valid to inject the $rootScope into Controller in order use or override models/method defined under $rootScope in AngularJS?
body: <p>I've defined some models in <code>App.run</code> below which I'm overriding within the controller <code>someCtrl</code>: </p>
  
  <pre><code>App.run(['$rootScope', function($rootScope) {
    $rootScope.attempt = 1;
  });
  
  function someCtrl($scope, $rootScope) {
    $rootScope.attempt = 2;
  
    $rootScope.checkAttempt = function () {
      return $rootScope.attempt &gt; 1 ? true : false;    
    };
  }
  </code></pre>
  
  <p>There is a button on the page out of <code>someCtrl's</code> scope:</p>
  
  <pre><code>&lt;button class='btn' ng-disabled="checkAttempt()"&gt;Who's changing my value?&lt;/button&gt;
  </code></pre>
  
  <p>FYI, I'm aware of creating a service or using emit-broadcaste mechanism to share data across controllers but I would like to know How authenticate is it to inject $rootScope into a controller?</p>