Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy load view models: Querystring change not registering as page change #167

Open
manzanotti opened this issue Mar 5, 2014 · 0 comments

Comments

@manzanotti
Copy link
Contributor

I have a listing page that is driven off a querystring parameter to load data from an AJAX call. This has a child page that contains links to other listings. Clicking on one of these links takes you back to the parent page, but does not update the data.

The link 'trail' is:

/#listing?testId=1
/#listing?testId=1/child
/#listing?testId=2

Clicking on that last link takes merely shows you the same data as if you'd clicked on the first link.

I've set it up so that you can do:

/#listing?testId=1
/#listing?testId=2

and this results in the same behaviour, namely that you only ever see the data for item 1.

I've stepped through my code, and it appears that the method called by withOnShow is called, but the function it returns is not called. The loadData method is therefore never called.

So, the question is, is this a bug in pager.js, expected behaviour, or an issue with how I'm using pager.js? Now, I'm always inclined to err on the side of it being my error, so if it is, how should I be coding up my navigation and view models?

http://jsfiddle.net/ry4UK/2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant