4.0.0-alpha.13 (2020-06-18)
- allow arbitrary selectors starting with # (14b859d)
- use assign to align with Vue browser support (#311) (f80b670), closes #304
- hash: use location.pathname (0078147), closes #261
- matcher: correct check when removing existing records on add (2c267f5)
- matcher: override records by name when adding (07100fc)
- scroll: avoid reusing scroll position (dfc1fb3)
- scroll: allow passing behavior option (12e9209)
- scroll: replace selector with el (ab8a01c)
- warn: warn if component is a promise (4b2bfa8)
- warn: warn when routes are not found (#279) (d125356)
- allow props for named views (dbe2344)
- warn: warn multiple params with same name (5c8cd6e)
- scroll: this change follows the RFC at vuejs/rfcs#176:
selector
is renamed intoel
el
also accepts anElement
left
andtop
are passed alongel
instead of inside an object passed asoffset
- scroll:
scrollBehavior
doesn't accept an object withx
andy
coordinates anymore. Instead it accepts an object likeScrollToOptions
withleft
andtop
properties. You can now also pass thebehavior
property to enable smooth scrolling in most browsers. - It is now necessary to escape id selectors like
explained at https://mathiasbynens.be/notes/css-escapes. This was
necessary to allow selectors like
#container > child
.
4.0.0-alpha.12 (2020-05-19)
- hash: allow base with non trailing slash (f5cc050), closes #247
- prevent error on initial navigation to //invalid (e72e4ba)
- warn: warn multiple leading slashes (87c5e53)
- hash: When providing a base for hash histories, it is now necessary
to include a trailing slash to create a url that starts with
/#/
, otherwise it will result in a url starting with#/
. This allows users to use the routing system directly in simple files without needing to configure a server at all:https://example.com/file.html
+base: 'file.html
will produce a final url ofhttps://example.com/file.html#/
https://example.com/folder
+base: 'folder
will produce a final url ofhttps://example.com/folder#/
https://example.com/folder
+base: 'folder/
will produce a final url ofhttps://example.com/folder/#/
4.0.0-alpha.11 (2020-05-12)
- scroll: change scrollRestoration if scrollBehavior is provided (5cf2e61)
- match base in a non-sensitive way (7087bbc)
- router: allow multiple router instance (24d3d49)
- router: unique first navigation with multi app (33172af)
- types: export NavigationGuardNext (#229) (888bf4d)
- explicit injection symbols in dev mode (#228) (fab88ee)
- support jsx and tsx for RouterLink and RouterView (1d3dce3), closes #226
- router: allow functional components for routes (096d864)
- scroll: scroll to the same location like regular links (5f22d4f)
- warn: warn if next was called multiple times (dce2612)
4.0.0-alpha.10 (2020-05-05)
- scroll: do not restore on push (3f79195)
- warn: warn invalid hash (fcf2365)
- allow numbers as params (ef0920a), closes #206
- router: allow global router classes (388735b)
- router: go, back and forward can be awaited (eb87757)
- warn: detect missing param in nested absolute paths (f5b5949)
- warn: warn for invalid path+params and redirect (91f4de9)
- warn: warn missing params in alias (186e275)
- warn: warn when params are provided alongside path (8a8ddf1)
4.0.0-alpha.9 (2020-04-29)
- Removed sourcemaps from build
4.0.0-alpha.8 (2020-04-29)
- default matcher options (cea397b)
- guards: preserve navigation options when redirecting (9effd81)
- html5: correctly preserve current history.state (0586394), closes #180
- link: make alias of empty child active (cfe5993)
- encode hash (85bb7e1)
- link: preserve the alias path (fffa585)
- matcher: merge params (d8a6b25), closes #189
- router: make redirect relative to target location (e878e91)
- router: preserve navigation options with redirects (9732758)
- view: render slot with no match (5873296)
- Link and View renamed to RouterLink and RouterView (030bbc4)
- link: make empty child active with adjacent children (4b813b1)
- router: add global pathOptions (7383564)
- add navigation duplicated failure (9570416)
- add onBeforeRouteUpdate (96c9503)
- resolve relative paths (eae833e)
- router: add back,forward,go (5e927b5)
- router: add beforeResolve (9697134)
- scroll: handle scroll on reload (617f131)
- use index access for strings (971fea4)
- exported components Link and View have been renamed to be include the Router prefix and to have the same export name as their component name
4.0.0-alpha.7 (2020-04-17)
- add
$route
and$router
types (a4f80aa) - add guards types (c7ccd5a)
- refactor navigation to comply with vuejs/rfcs#150 (290c3be)
- This follows the RFC at vuejs/rfcs#150
Summary:
router.afterEach
androuter.onError
are now the global equivalent ofrouter.push
/router.replace
as well as navigation through the interface (history.go()
). A navigation only rejects if there was an unexpected error. A navigation failure will still resolve the promise returned byrouter.push
and be exposed as the resolved value.
4.0.0-alpha.6 (2020-04-17)
- history: allow base with / and base tag (d7c71b5), closes #164
- history: allow hash history with no origin (760d216), closes #163
- scroll: only apply on browser (cf53192)
- revert history navigation if navigation is cancelled (d8a0d11)
- router: merge createHref into resolve (66b2db9)
- add this.$route (92dc18d)
- add this.$router (1807f30)
- scroll: handle scroll on popstate (181efe9)
- merge meta fields (72a052f)
- guards: support errors in navigation guards (23ed08d)
- router: hasRoute (ca02444)
- Revert "test: only call browser.end on the last test" (d3221f1)
- router: createHref is removed from the router. Instead, resolve
returns a location object with the corresponding
href
property
4.0.0-alpha.5 (2020-04-08)
- link: not active when matched is empty (acd644d)
- check query and hash when navigating (3862ad9)
- ignore order of keys in query and params (643bd15)
- skip initial guards with static redirect (c76bb93)
- types: add missing exported types (ec241f7), closes #147
- allow symbols as route record name (f42ab3f)
- link: activeClass and exactActiveClass props (d53b383)
- link: allow
custom
prop (874510b)
- Renamed types by removing suffix Normalized and using Raw instead
RouteLocation
->RouteLocationRaw
RouteLocationNormalized
->RouteLocation
RouteLocationNormalized
is now a location that can be displayed (not a static redirect)RouteLocationNormalizedResolved
->RouteLocationNormalizedLoaded
RouteRecord
->RouteRecordRaw
RouteRecordNormalized
->RouteRecord
RouteRecordNormalized
is now a record that is not a static redirect
4.0.0-alpha.4 (2020-03-28)
- history: use current history state when replacing (5d80209)
- export more types (1583d48), closes #137
- guards: free instances only if navigation is confirmed (d0514e1)
- hash: fix base position for hash routing (ba40b8f)
- initial location with base (d05208b)
- router: prevent duplicated navigation on aliases (e825586)
- allow passing state to history (ac1c96f)
- improve route access (baf266c)
- history: expose state on html5 (3f83607)
- matcher: remove aliases alongside the original record (26b71b2)
- router: support custom parseQuery and stringifyQuery (#136) (5dce7bc)
- view: add props option as boolean (7fe1e7d)
- view: allow passing props as a function (494fc5e)
- view: useView to customize router-view (06b0c34)
- allow true in
next
(d76c6aa) - invoke guards with the right context (7053413)
- lazy loading (6ecdc70)
- view: allow props as object in record (fd4dc06)
useRoute
now retrieves a reactive RouteLocationNormalized instead of a Ref. This means there is no need to use.value
when accessing the route. You still need to wrap it withtoRefs
if you want to expose parts of the route:setup () { return { params: toRefs(useRoute()).params } }
4.0.0-alpha.3 (2020-03-14)
- add missing type definitions
4.0.0-alpha.2 (2020-03-14)
- history: correct url when replacing current location (704b45e)
- link: allow attrs to override behavior (4cae9db)
- link: allow custom classes (#134) (392c295), closes #133
- link: navigate to the alias path (3284110)
- link: non active repeatable params (0ccbc1e)
- add aliasOf to normalized records (d9f3174)
- handle active/exact in Link (6f49dce)
- matcher: link aliases to their original record (e9eb648)
4.0.0-alpha.1 (2020-02-26)
- rename createHistory and createHashHistory (7dbebb6)
- add dynamic routing at router level (a7943c6)
-
createHistory
is now namedcreateWebHistory
.createHashHistory
is now namedcreateWebHashHistory
.Both createHistory and createHashHistory are renamed to better reflect that they must be used in a browser environment while createMemoryHistory doesn't.
4.0.0-alpha.0 (2020-02-26)
Breaking changes compared to [email protected]
mode: 'history'
->history: createHistory()
- Catch all routes (
/*
) must now be defined using a parameter with a custom regex:/:catchAll(.*)
keep-alive
is not yet supported- Partial support of per-component navigation guards. No
beforeRouteEnter
yet