Changelog
2.0.0
getRoute
will now decodeURIComponent
route values, you might need to remove decodeURIComponent
from your route actions if you were supporting extended characters manually in your routes.Changelog
1.0.0
navigate
is no longer used as part of router.getRoute
optionsroute.navigate
has been removed from the matched route objectquery
property containing the map of
query parameters. router.makePath
now accepts a third query
parameter
which is a map of query parameters to add to the resulting URL string. e.g.
router.makePath('home', {}, { foo: 'bar' });
will result in /?foo=bar
.
Query strings are generated using the query-string
npm module, but can
be customized by adding the options.queryLib
to the Router
constructor.
The replacement should have a parse
and stringify
method similar to
query-string
. An example replacement would be qs
.route.method
attribute. By default, routes with an undefined
method
will match ANY method.Changelog
0.1.0