Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Routing with AngularJS and jQuery Mobile

I'm working on a jQuery/jQuery-mobile based webapp and I was asked to use AngularJS. As expected, I have some problem on handling routing. I know there are lots of people discussing about it, but still I haven't found a working solution.

I have already read this page that someone suggested, but loading first jQuery mobile and then angular doesn't help.

Now I'm taking a look to this library but I'm not sure the company will let me use it, 'cause it's still on alpha stage and my work could became (hopefully) a production webapp. I'm now wondering how can I let JQM handle AngularJS route too, I think this could be the best solution for me.

Has anyone managed it? Can you provide me a working example or another possible solution? Thanks.

like image 707
peppeuz Avatar asked Feb 12 '14 12:02

peppeuz


1 Answers

Best way to solve it is to disable JQM routing, try this:

$.mobile.ajaxEnabled = false;
    $.mobile.linkBindingEnabled = false; 
    $.mobile.hashListeningEnabled = false; 
    $.mobile.pushStateEnabled = false; 
    $.mobile.changePage.defaults.changeHash = false;
like image 134
FrancescoMgl Avatar answered Sep 30 '22 04:09

FrancescoMgl