opitzconsulting / jquery-mobile-angular-adapter

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

Fragment page doesn't go anywhere when "#fragment" isn't a valid page id #218

Open mato2000 opened 11 years ago

mato2000 commented 11 years ago

in jQuery Mobile (without the adapter or angular), when a #fragment page is not found, it loads the first page in the html. I've found that with the adapter doesn't load any page (just shows a background and the ajax loader) Is this a desired behaviour? How can I adapt the jqm original behaviour? Thanks! Matias.

tbosch commented 10 years ago

Hi Matias, you could set the hash always to empty when the app is opened, so people would always start at the first page. Or you could try to listen to $locationChangeSuccess event on $rootScope, check $location.hash() and the dom and then change $location.hash() to an empty string if the page does not exist.