azicchetti / jquerymobile-router

A router/controller for jquery mobile. Also adds support for client-side parameters in the hash part of the url. The routes handles regexp based routes. This plugin can be used alone or (better) with Backbone.js or Spine.js, because it's originally meant to replace their router with something integrated with jQM.
GNU General Public License v2.0
402 stars 69 forks source link

How does one access the data object resultant from a $.mobile.navigate('#target',{}) invocation #81

Open mccainz opened 10 years ago

mccainz commented 10 years ago

From jQuery land I initiate a navigation using $.mobile.navigate('#target',{...}), but I never see my data object appear within the context of my route handler. My router catches the bC event and routes correctly but the data object of the event is empty? I am left appending a query string to the targetURL.

azicchetti commented 10 years ago

Hi, I think we cannot access the data object from pagebeforechange handlers when triggered by $.mobile.navigate().

I guess that only window's "navigate" handlers may use the data object passed as the second argument to $.mobile.navigate().