Releases: vaadin/router
v1.6.0
Live Demo →
API Documentation →
New features
-
b5b80ad feat: add router-ignore attribute to let the browser handle navigation (#421)
Fixes: #325
Makes Vaadin Router not handle the click events on links with the
router-ignore
attribute.
Other changes
v1.5.2
Live Demo →
API Documentation →
Bug fixes
-
e0da44a fix: change default baseUrl to be an absolute pathname (#410)
Fixes #409. Previously, Vaadin Router taked base href as baseUrl which is later resolved against document.baseURI regardless it's a relative one or not. Semantically, baseUrl shouldn't be in relative form because it is the prefix of every route in the Router. With this change, it resolves the relative base href to be an absolute pathname before setting it as the baseUrl.
v1.5.1
Live Demo →
API Documentation →
Bug fixes
-
1bfd0ae fix: ensure location-changed event is timed after window.location update (#407)
Fixes #340. Makes sure
window.location
is up-to-date whenvaadin-router-location-changed
. -
f2f9210 fix: add browser history states for non-initial redirects (#406)
Fixes #324. Before the change, when Vaadin Router redirects, the new location was replacing the last browser history entry instead of adding a new one. With this change, only the initial Vaadin Router render, if redirects, replaces the last history entry, the second and subsequent renders always append history entries.
v1.5.0
Live Demo →
API Documentation →
New features
This release includes improvements on search query string and hash support (issue #56).
-
63ee8d6 feat: support search and hash strings in Router.go (#400)
The
Router.go
navigation API method now accepts pathname with search and hash strings in a single in-app URL string:Router.go('/path?searchParam=value#footnotes');
as well as separately:
Router.go({pathname: '/path', search: '?searchParam=value', hash: '#footnotes'});
The search and hash strings do not participate in route matching, however they are available in the action’s
context
argument and the component’slocation
property objects (see #396). -
9341511 docs: add demos for search and hash usage (#397)
This adds documentation on using search query string and hash string with Vaadin Router, including examples on how to access them from components and actions, and how to construct and parse search query strings using
URLSearchParams
native API.
Bug fixes
-
b64acd8 fix: Router.go string pathname parsing in IE (#401)
Fixes a parsing bug concerning the search query string support in the URL API ponyfill Vaadin Router internally uses in browsers that lack native
URL
construction support. -
5a37eb4 fix: ensure search and hash in context, location, and lifecycle (#396)
Makes search and hash strings consistently available in the Router API.
v1.4.3
v1.4.2
Live Demo →
API Documentation →
New features
-
execute onBeforeLeave and onBeforeEnter when changing parameter
Fixes #387.
Other changes
-
update documentation for onBeforeLeave and onBeforeEnter
-
rename misleading variable and strengthen isReusableElement check
-
show a progress bar when throttler is waiting
v1.4.1
v1.4.0
Live Demo →
API Documentation →
New features
-
add TypeScript declarations
Fixes #304.
-
setRoutes
has now theskipRender
param and returns a Promise -
router.location
includes nowsearch
andhash
parameters
Bug fixes
-
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 inpackage.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
andhash
initial location state were discarded and stripped from the URL as a result of initial router render after firstsetRoutes
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.
Other changes
-
fix(docs): lifecycle callbacks on dynamicly imported routes (#369)
-
chore: update npm dependencies (#381)
Fixes the security issues in
eslint-utils
(GHSA-3gx7-xhv7-5mx3).
v1.3.0
Live Demo →
API Documentation →
New features
-
#261 Preserve
location.search
andlocation.hash
when navigating-
Pass
search
andhash
together withpathname
to navigate fromPOPSTATE
andCLICK
navigation triggers to the router -
Expose
search
andhash
string keys incontext
object argument of route actions
-
Bug fixes
-
#342 enable rendering
HTMLElement
created without usingcontext.component
-
#321 pass the correct route params to lifecycle callbacks in child routes (#322)
Other Changes
-
Update supported Node.js version to 10
-
Dependency updates
v1.2.1
Live Demo →
API Documentation →
Improvements:
- Added
"module"
field topackage.json
for @pikapkg tools compatibility