Small and powerful client-side router for Web Components. Framework-agnostic.
Live Demo → API Documentation →
store previousContext when reusing element (#391)
do not remove layout content that is not part of the route chain (#392)
Live Demo → API Documentation →
execute onBeforeLeave and onBeforeEnter when changing parameter
Fixes #387.
update documentation for onBeforeLeave and onBeforeEnter
rename misleading variable and strengthen isReusableElement check
show a progress bar when throttler is waiting
This is a patch release to put the @vaadin/router
npm package version in sync with the version reported through the Vaadin.registrations
global at the run time.
Live Demo → API Documentation →
add TypeScript declarations
Fixes #304.
setRoutes
has now the skipRender
param and returns a Promise
router.location
includes now search
and hash
parameters
fix: keep the url when the context does not change
Fixes #329.
Previously, if navigation originating from pressing the back button was prevented, the browser was still changing the URL. The fix puts the original URL back in such a case.
fix: add prepare script to allow usage via git directly (#367)
Adds prepare
script in package.json
that builds the router entrypoints from source. This allows convenient symlink / folder / github installation.
fix: preserve search and hash on the first render (#359)
Fixes #356.
The search
and hash
initial location state were discarded and stripped from the URL as a result of initial router render after first setRoutes
call. The fix makes sure this does not happen.
fix: render correctly if reusing the same instance or same tagName (#375)
Fixes #357.
This supports reusing the same element instance in navigation, fixes issues with rendering the element and its content being removed.
fix: get search and hash only if given a context (#368)
Fixes #366
Before the fix, the string argument of render('/pathname')
was mistreated as an object, and its .search
and .hash
key contents were taken into account. The fix makes sure that the string argument is treated as a pathname string only.
fix: events and detach/re-attach (#370)
Fixes #355, #361, #360, #311, #331
This fixes a few connected issues regarding lifecycle callbacks and detaching/re-attaching DOM elements when reusing same element instances.
fix(docs): lifecycle callbacks on dynamicly imported routes (#369)
chore: update npm dependencies (#381)
Fixes the security issues in eslint-utils
(https://github.com/mysticatea/eslint-utils/security/advisories/GHSA-3gx7-xhv7-5mx3).
Live Demo → API Documentation →
#261 Preserve location.search
and location.hash
when navigating
Pass search
and hash
together with pathname
to navigate from POPSTATE
and CLICK
navigation triggers to the router
Expose search
and hash
string keys in context
object argument of route actions
#342 enable rendering HTMLElement
created without using context.component
#321 pass the correct route params to lifecycle callbacks in child routes (#322)
Update supported Node.js version to 10
Dependency updates
Live Demo → API Documentation →
"module"
field to package.json
for @pikapkg tools compatibilityLive Demo → API Documentation →
urlForName
and urlForPath
methods)baseUrl
router option API specs)#273, #265, #269, #271, #264, #256
Live Demo → API Documentation →
Live Demo → API Documentation →
Live Demo → API Documentation →