I have an app created with Cordova, Onsen (and Angular) working well on Android and iOS, and I want to export it on windows 8.1. When I run the app on Visual Studio , I get these errors :
Eccezione generata alla riga 1958, colonna 11 in ms-appx://xx.xxx.xxxx/www/lib/onsenui/js/angular/angular.js 0x800a139e - JavaScript runtime error: [$injector:nomod] Module 'ngLocale' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.4.3/$injector/nomod?p0=ngLocale
Eccezione generata alla riga 1958, colonna 11 in ms-appx://xx.xxx.xxxxx/www/lib/onsenui/js/angular/angular.js 0x800a139e - JavaScript runtime error: [$injector:nomod] Module 'templates-main' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.4.3/$injector/nomod?p0=templates-main
The app starts, loads the js content, but I have the idea that the Angular controller never starts... In the inspector in Visual Studio, I can see that there is no body tag loaded (inside the html tag there is only the head tag).
No other error is raised, so I'm thinking that the 2 errors are the cause of all.
I already have added winstore-jscompat.js library for making AngularJS work in app.
I searched everywhere for a solution, but I didn't find anything useful. (also here in Stackoverflow, I found a similar question, but nobody answered (https://stackoverflow.com/questions/33303379/error-nglocale-is-not-available-when-start-windows-8-1-app)
All is handled by a controller
<body ng-controller="AppController as app">
I hope that someone has some suggestion.
Thanks in advance
EDITED on 18.04.2016, after the comment below
I have only one module, and the bootstrap is done in this way:
var pmod = ons.bootstrap('pmod', ['onsen', 'ngSanitize']);
This is the controller:
pmod.controller('AppController', ["$scope", "$window", function($scope, $window){
var _self = this;
ons.ready(function()
{
$("body").addClass("c_" + device.platform.toLowerCase());
document.addEventListener("resume", onResume, false);
home.refresh();
navigator.splashscreen.hide();
// other instructions here, working without errors ...
// ...
});
// other functions here ...
return _self;
}]);
In Visual Studio, when I run the app, I see this :
As you can see I have no body tag.