d4f / backbone-highway

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

highway.go params does not take an object #29

Closed ghost closed 7 years ago

ghost commented 7 years ago

For a given route declaration

highway.route({
  name: 'profile',
  path: '/user/:id'
})

Navigating to the route by passing the parameters as an object should work

highway.go({ name: 'profile', params: { id: 42 } })

But instead, it only works when using an array

highway.go({ name: 'profile', params: [42] })