Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Access to Page in withOnShow handler #27
First, thanks for creating a really nice library!
It would be nice to have access to the Page object when dynamically fetching viewmodels in "withOnShow". I modified the source for withOnShow to pass "this", just like you are currently doing for sourceOnShow:
This allow me to retrieve specific data for my views based on the route, eg
Off course, ability to use wildcards would be even better, to say something like:
But I don't think this is an easy addition? However, I hope you will consider adding the page parameter as described above.
I checked out your fork and found that you had another interesting addition (the cache control). Reminds me that I need to review all the parameters in different callbacks (withOnShow etc) and try to unify their parameters. At the moment it's basically accidental design which parameters are sent to a callback... .
I fetched your repo and merged with my repo so now your changes are in. Thanks for sharing!