d4f / backbone-highway

Routing Backbone with style \o/
MIT License
19 stars 5 forks source link

Add query parameters to state #46

Closed ghost closed 6 years ago

ghost commented 6 years ago

Fixes #31

highway.route({
  name: 'home',
  path: '/',
  action (state) {
    console.log(state.query) // { hello: 'world' }
  }
})

// Navigate to http://<your-site>/?hello=world or
highway.go({ name: 'home', query: { hello: 'world' } })