opitzconsulting / jquery-mobile-angular-adapter

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

1.1.0 / 1.1.1-SNAPSHOT does not work in Phonegap #60

Closed vibol closed 11 years ago

vibol commented 11 years ago

Hi Tobias,

Trying to load a simple Phonegap app using the standalone library causes the app to not initialize.

ng.config(['$provide', '$locationProvider', function ($provide, $locationProvider) {
            $provide.decorator('$browser', ['$sniffer', '$delegate', function ($sniffer, $browser) {
                if ($locationProvider.jqmCompatMode()) {
                    // Angular should not use the history api and use the hash bang location service,
                    // which we will extend below.
                    $sniffer.history = false;
                    reusejQueryMobileHashChangeForAngular($browser);
                }
                return $browser;
            }]);
        }]);
2012-09-05 13:10:13.158 SimpleApp[21670:13403] Multi-tasking -> Device: YES, App: YES
2012-09-05 13:10:14.146 SimpleApp[21670:13403] Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)

Do you have any ideas what might be causing this?

vibol commented 11 years ago

It looks, to do a proper 'back' when jqmCompatMode is set, you have to just do a reverse transition to the previous page:

$navigate({target:'#splash',changeHash:false,reverse:true})

tbosch commented 11 years ago

Hi, could you try again with the yesterday released 1.1.1 version? I changed something at this code location. Mmh, how did you narrow the problem down to this location? Could you also provide some more derails about your app? Eg the url that is used in PhoneGap to load the app, are you using additional libraries, and your Index.html. This would help a lot in reproducing this problem...

Thanks for reporting, Tobias

Am 05.09.2012 um 22:16 schrieb "vibol" notifications@github.com:

NSURLErrorDomain

tbosch commented 11 years ago

Oh, and is this android or iOS? If iOS: also in the simulator?

Am 05.09.2012 um 22:16 schrieb "vibol" notifications@github.com<mailto:notifications@github.com>:

Hi Tobias,

Trying to load a simple Phonegap app using the standalone library causes the app to not initialize.

ng.config(['$provide', '$locationProvider', function ($provide, $locationProvider) { $provide.decorator('$browser', ['$sniffer', '$delegate', function ($sniffer, $browser) { if ($locationProvider.jqmCompatMode()) { // Angular should not use the history api and use the hash bang location service, // which we will extend below. $sniffer.history = false; reusejQueryMobileHashChangeForAngular($browser); } return $browser; }]); }]);

2012-09-05 13:10:13.158 SimpleApp[21670:13403] Multi-tasking -> Device: YES, App: YES 2012-09-05 13:10:14.146 SimpleApp[21670:13403] Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)

Do you have any ideas what might be causing this?

— Reply to this email directly or view it on GitHubhttps://github.com/tigbro/jquery-mobile-angular-adapter/issues/60.

tbosch commented 11 years ago

Hi, just tried the adapter in version 1.1.1-SNAPSHOT in the ios simulator with the current Phonegap 2.1 and it works. Closing this, seems to be related to #64. If you still have problems with phonegap, please reopen this ticket. Thanks for reporting this, Tobias