Phonegap Cordova 3.7 and Angularjs 1.3 ngRoute not working
My code works on mobile chrome, but not cordova. I have an error while trying to download the application. It looks like the angular route module is not loaded, but everything works on the same device via the Chrome browser (Android).
in my mind
<script type="text/javascript" src="cordova.js"></script>
<script src="scripts/jquery-1.11.2.min.js"></script>
<script src="scripts/angular.min.js"></script>
<script src="scripts/angularroute.min.js"></script>
<script src="scripts/angular.app.bootstrap.js"></script>
<script src="scripts/controllers/slideMenuController.js"></script>
<script src="scripts/controllers/searchController.js"></script>
<script src="scripts/others.js"></script>
in other.js:
document.addEventListener('deviceready', function(){
angular.bootstrap(document, ['myApp']); // <- this throws error
}, false);
my mistake:
https://docs.angularjs.org/error/$ injector / modulerr? p0 = myApp & p1 = Error:% 20% 5B $ injector: nomod% 5D% 20http:% 2F% 2Ferrors.angularjs.org% 2F1.3.15% 2F $ injector% 2Fnomod% 3Fp0% 3DmyApp% 0A% 20% 20% 20% 20at% 20Error% 20 (% 3Canonymous% 3E)% 0A% 20% 20% 20% 20at% 20file:% 2F% 2F% 2Fandroid_asset% 2Fwww% 2Fscripts% 2Fangular.min.js: 6: 417% 0A% 20 % 20% 20% 20at% 20file:% 2F% 2F% 2Fandroid_asset% 2Fwww% 2Fscripts% 2Fangular.min.js: 21: 412% 0A% 20% 20% 20% 20at% 20a% 20 (file:% 2F% 2F % 2Fandroid_asset% 2Fwww% 2Fscripts% 2Fangular.min.js: 21: 53)% 0A% 20% 20% 20% 20at% 20file:% 2F% 2F% 2Fandroid_asset% 2Fwww% 2Fscripts% 2Fangular.min.js: 21: 296 % 0A% 20% 20% 20% 20at% 20file:% 2F% 2F% 2Fandroid_asset% 2Fwww% 2Fscripts% 2Fangular.min.js: 35: 46% 0A% 20% 20% 20% 20at% 20r% 20 (file: % 2F% 2F% 2Fandroid_asset% 2Fwww% 2Fscripts% 2Fangular.min.js: 7:302)% 0A% 20% 20% 20% 20at% 20g% 20 (file:% 2F% 2F% 2Fandroid_asset% 2Fwww% 2Fscripts% 2Fangular.min.js: 34: 399)% 0A% 20% 20% 20% 20at % 20ab% 20 (file:% 2F% 2F% 2Fandroid_asset% 2Fwww% 2Fscripts% 2Fangular.min.js: 38: 135)% 0A% 20% 20% 20% 20at% 20d% 20 (file:% 2F% 2F% 2Fandroid_asset% 2Fw WW% 2Fscripts% 2Fangular.min.js: 17: 381
source to share
No one has answered this question yet
See similar questions:
or similar: