Changed:
- Popping a route that is not nested will navigate to the root, rather than doing nothing. 21ef7fa
Added:
- Moved build to rollup which reduces build size and adds more build file types to consume depending on a user's needs. 0d22809
Fixed:
- Fix
hashchange
on older browsers (IE8-11). Adds polyfill to provideoldURL
andnewURL
properties on thehashchange
event. 7d10c81
Fixed:
- Before handlers and leave handlers called BEFORE route is actually changed.
Changed:
- Pass more information in before and after change handlers. f0d42d5
- Pass more information in load and popstate handlers. dac14436
Added:
- Cancel route change if
handleBeforeChange
returns false. 8a1aacf
Fixed:
- Call enter handler on load, but not by calling navigate as that causes issues in edge cases. e2465c7
Added:
- Add
pop
method to router that navigates to a new route found by popping off the last segment of the route. eg./route1/route2/
pops to/route1/
. 312b1b7
Fixed:
unrecognizedRouteHandler
is now only called when a route is being entered, not when it is left. This prevents the handler from being called twice on unrecognized routes. 579e27a
Added:
- Added new lifecycle hooks
beforeRouteChange
andafterRouteChange
that are called before theleave
handler andafter
the enter handler respectively. 4f2eba7 - Added
persistState
configuration instead of always usingwindow.history.replaceState
.replaceState
is still the default, but nowpushState
or another function can be used in its stead. ef57f12
Fixed:
- Bug where default route change behavior could be overridden with
handleRouteChange
config hook. 4f2eba7 - Bug where
enter
route handler was not called on load. 52067c4
Breaking Changes:
- Removed
handleRouteChange
hook as using it caused the router to not work. UsebeforeRouteChange
andafterRouteChange
hooks instead. 4f2eba7
Added:
- Added optional
options
argument tonavigate
function. Supportstrigger
option that forceshandleRouteChange
to be called even if the route has not changed. 5e2f120
Changed:
- Removed use of
window
external in webpack configuration. This means there is less configuration to usejsrouter
as awindow
module does not need to be provided. 0e2bbd0
- Updated dependencies and enough documentation to warrant a minor release.
- Initial stable release.