While the app is running, I encountered the following:
Uncaught ReferenceError: cordova is not defined
ionic-core.js:466 Ionic Core: init
ionic-core.js:145 Ionic Core: searching for cordova.js
ionic-core.js:149 Ionic Core: cordova.js has already been loaded
I find this situation quite confusing as Ionic appears to be attempting to load cordova before it is defined. This hinders my ability to use other services that depend on this condition. Therefore, my question is: Is there a way to load cordova asynchronously or could there be another issue causing this problem?
index.html
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/angular-websocket/angular-websocket.js"></script>
<script src="lib/ionic-service-core/ionic-core.js"></script>
<script src="lib/ionic-service-push/ionic-push.js"></script>
<script src="lib/facebook-connect-plugin/index.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
<script src="js/utils.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="lib/ngCordova/dist/ng-cordova.min.js"></script>
<script src="cordova.js"></script>