d4f / backbone-highway

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

Support splat params when injecting parameters #10

Closed ghost closed 8 years ago

ghost commented 8 years ago

If a route is defined using splat params (e.g. /users/*) the go method should inject what ever is given as route arguments correctly.

// Define a route with splat param
Backbone.Highway.route('user.detail', {
  path: '/users/*',
  action: function () {}
});

// Execute route
Backbone.Highway.go('user.detail', ['42/detail']); // Should route to /users/42/detail