]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: hash encoding
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 11 Sep 2020 11:32:34 +0000 (13:32 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 11 Sep 2020 11:32:34 +0000 (13:32 +0200)
docs/guide/migration/index.md

index 7691e16466dd985c1832c2fb78bc209b77c0867b..29de36897f1f1be18bdc0043b401fd075716ab58 100644 (file)
@@ -90,10 +90,10 @@ Decoded values are now consistent no matter where the navigation is initiated (o
 Given any [normalized route location](/api/#routelocationnormalized):
 
 - Values in `path`, `fullPath` are not decoded anymore. They will appear as provided by the browser (modern browsers provide them encoded). e.g. directly writing on the address bar `https://example.com/hello world` will yield the encoded version: `https://example.com/hello%20world` and both `path` and `fullPath` will be `/hello%20world`.
-- `hash` is now decoded, that way it can be copied over: `router.push({ hash: $route.hash })`.
+- `hash` is now decoded, that way it can be copied over: `router.push({ hash: $route.hash })` and be used directly in [scrollBehavior](/api/#scrollbehavior)'s `el` option.
 - When using `push`, `resolve` and `replace` and providing a `string` location or a `path` property in an object, **it must be encoded**. On the other hand, `params`, `query` and `hash` must be provided in its unencoded version.
 
-**Reason**: This allows to easily copy existing properties of a location when calling `router.push()` and `router.resolve()`. Learn more about encoding [in the cookbook](#TODO).
+**Reason**: This allows to easily copy existing properties of a location when calling `router.push()` and `router.resolve()`, make it consistent across browsers. Learn more about encoding [in the cookbook](#TODO).
 
 ## Breaking Changes: API Changes