I have created an application using ionic for android and ios, and its working fine, but now i am trying to get it too work on WP8. it seems that if i exclude the ionic.bundle.js file, my deviceReady event gets called once. But if i include the ionic.bundle.js file, it gets called twice?
Anyone had experience with this? I thought i would test it by including the files individually, but not sure what to include and what to change in my app configuration.
I need to bootstrap the app with angular, and i am doing this via the deviceReady event, here is my code.
angular.module('myApp', [
'ionic',
'ngCordova'
])
.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
....
}])
.run(function (AppData) {
console.log(".run() called");
// run some cordova plugins here
});
// manually bootstrapping angular, once deviceReady event has been called
function onDeviceReady() {
console.log("onDeviceReady() called");
// bootstrap angular
angular.bootstrap(document.body, ['m2iAnywhere']);
};
document.addEventListener("deviceready", onDeviceReady, false);
Currently i just include the following ionic files on my index.html page
<script type="text/javascript" src="lib/ionic/js/ionic.bundle.min.js"></script>
<script type="text/javascript" src="lib/ngCordova/ng-cordova.js"></script>
My contents of my index.html page are
<body>
<ion-nav-bar class="nav-title-slide-ios7 bar-positive">
</ion-nav-bar>
<ion-nav-view animation="slide-left-right">
<!-- Center content -->
</ion-nav-view>
</body>
Can someone shed some light on this for me please?
oh, i am using the latest version - beta8