title: Cordova 'deviceready' event not firing from within angular .run block
body: <p>I'm having issues getting 'deviceready' to register from inside of AngularJS. I'm certain this was working before, so I'm not sure what's changed.</p>
  
  <p>If I call 'deviceready' from a global addEventListener, it works, like so:</p>
  
  <pre><code>document.addEventListener('deviceready', function(){
     localStorage.deviceReadyGlobal = true;
  });
  </code></pre>
  
  <p>deviceReadyGlobal=true is set. However, if I try to attach this from within Angular, it never fires, like so:</p>
  
  <pre><code>app.run(function(){
      document.addEventListener('deviceready', function(){
          localStorage.deviceReadyAngular = true;
      });
  });
  </code></pre>
  
  <p>deviceReadyAngular is never set. Now, I understand that PhoneGap probably already fired 'deviceready' while Angular was bootstrapping, but according to the PhoneGap docs, that shouldn't matter.</p>
  
  <blockquote>
    <p>The deviceready event behaves somewhat differently from others. Any
    event handler registered after the deviceready event fires has its
    callback function called immediately.</p>
  </blockquote>
  
  <p>Did something change in the behavior of 'deviceready'?</p>
  
  <p>I'm using Cordova 3.3.0 and Angular 1.2.5 currently.</p>