You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/basics/RouteMatching.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,13 @@ A route path is [a string pattern](/docs/Glossary.md#routepattern) that is used
15
15
-`:paramName` – matches a URL segment up to the next `/`, `?`, or `#`. The matched string is called a [param](/docs/Glossary.md#params)
16
16
-`()` – Wraps a portion of the URL that is optional
17
17
-`*` – Matches all characters (non-greedy) up to the next character in the pattern, or to the end of the URL if there is none, and creates a `splat`[param](/docs/Glossary.md#params)
18
+
-`**` - Matches all characters (greedy) until the next `/`, `?`, or `#` and creates a `splat`[param](/docs/Glossary.md#params)
18
19
19
20
```js
20
21
<Route path="/hello/:name">// matches /hello/michael and /hello/ryan
21
22
<Route path="/hello(/:name)">// matches /hello, /hello/michael, and /hello/ryan
22
23
<Route path="/files/*.*">// matches /files/hello.jpg and /files/path/to/hello.jpg
24
+
<Route path="/**/*.jpg">// matches /files/hello.jpg and /files/path/to/file.jpg
23
25
```
24
26
25
27
If a route uses a relative `path`, it builds upon the accumulated `path` of its ancestors. Nested routes may opt-out of this behavior by [using an absolute `path`](RouteConfiguration.md#decoupling-the-ui-from-the-url).
0 commit comments