opitzconsulting / jquery-mobile-angular-adapter

jquery mobile angular adapter
MIT License
517 stars 114 forks source link

angular adapter and WP8 Cordova: problems with x-wmapp0 format #93

Open johnnyelwailer opened 11 years ago

johnnyelwailer commented 11 years ago

when trying to use the angular jqm adapter in an wp8 cordova based app, I get an error in angularjs in the matchurl function, because it tries to match the url: x-wmapp0:www/index.html the protocol won't get recognized by the regex(because it looks invalid, missing the // probably). I'm not sure where it fails in the adapter part, but if I don't include the angular jqm adapter, the error won't appear. The whole page will not load.

how can we solve this?

thanks.

edit: this might be more of a Cordova/JQM Bug, I think I'll wait for the official release of Cordova 2.3 and the wp8 template (now using rc2)

johnnyelwailer commented 11 years ago

Now when I put a <base/> element in the head,the error won't show up and the current page loads correctly, but all navigation fails(i have a routeprovider set up), but it fails at any navigation even without defined routes. inside cordovas xmlhttprequest the error is: "Error in error callback: File1659018491 = TypeError: Unable to get property 'length' of undefined or null reference" and it's trying to load "/www/www/map.htm" with one www too much, but depends on which url I try: map.htm, map, /map, #/map, #map... the error only occurs once then probably breaks something :)

tbosch commented 11 years ago

Hi, sorry, I can't fix this from the side of the adapter :-( Could you create an issue on the Gihub page of AngularJs? Please check in advance if there is no existing tracker there, and if the issue occurs when you are using only AngularJs without jqm and the adapter (but with routing enabled, e.g. with angular.module(["ng"]).run(function($route) { });

Tobias

tbosch commented 11 years ago

Hi, here is the corresponding issue in angularjs: https://github.com/angular/angular.js/issues/2303