We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How can i retrieve the state associated with a request?
For instance:
ways = require( "ways" ) ways( "/save", function( req ) { console.log( "How to retrieve the state object here?", req ); } ); ways.go( "/save", "", { hi: true } )
The text was updated successfully, but these errors were encountered:
Good one, I wonder how it never popped out before. 😄
Ideally it should be:
ways( "/route", function( req, params, state ) { // ... } );
However it should be done, pull requests wellcome.
In this meanwhile, you can do something:
// pseudo code here (not tested) var addressbar = require('ways-addressbar'); ways.use(addressbar); ways( "/route", function( req ) { console.log(addressbar.history); } ); ways.go('/route', {hi: true});
Something should be there. :)
Sorry, something went wrong.
i'm not using addressbar.... in that case ?
In this case, following the frist link I've sent, in you're here, without history / pushstate.
You can do a plugin and make it handle state/history for you, the basics are also covered in the tests in case you wanna take a look.
No branches or pull requests
How can i retrieve the state associated with a request?
For instance:
The text was updated successfully, but these errors were encountered: