title: Why cordova is not defined?
body: <p>I try build project android from IONIC. I want make app running in background and I use <a href="https://github.com/katzer/cordova-plugin-background-mode" rel="nofollow noreferrer">cordova-plugin-background-mode</a> but after include some code show error message in debugger. Error message like this <code>cordova is not defined</code>. I just include code like this</p>
  
  <pre><code>document.addEventListener('deviceready', function () {
  
  }, false);
  cordova.plugins.backgroundMode.enable();
  </code></pre>
  
  <p>I don't know why cordova is not defined. Please help me to solve this problem, Thanks</p>