Commit 88bba84
committed
feat(routeProvider): Add support to catch-all parameters in routes
This allows routeProvider to accept parameters that matches substrings even
when they contain slashes if they are prefixed with an asterisk instead of
a colon.
This PR introduces a new syntax for route params, so we would have:
:param for a single param
*param for catch-all params
For example, routes like edit/color/:color/largecode/*largecode will match
with something like this:
http://appdomain.com/edit/color/brown/largecode/code/with/slashs
It also matches catch-all routes in the middle of the path.
BREAKING CHANGE: Asterisk is not allowed anymore as part of the route
definition1 parent 69be39f commit 88bba84
2 files changed
+76
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
339 | 336 | | |
340 | 337 | | |
341 | 338 | | |
342 | | - | |
| 339 | + | |
343 | 340 | | |
344 | | - | |
| 341 | + | |
345 | 342 | | |
346 | 343 | | |
347 | 344 | | |
348 | 345 | | |
349 | | - | |
| 346 | + | |
350 | 347 | | |
351 | 348 | | |
352 | 349 | | |
353 | 350 | | |
354 | | - | |
| 351 | + | |
355 | 352 | | |
356 | 353 | | |
357 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
358 | 360 | | |
359 | 361 | | |
360 | 362 | | |
361 | 363 | | |
362 | 364 | | |
363 | | - | |
| 365 | + | |
364 | 366 | | |
365 | 367 | | |
366 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
62 | 119 | | |
63 | 120 | | |
64 | 121 | | |
| |||
84 | 141 | | |
85 | 142 | | |
86 | 143 | | |
87 | | - | |
| 144 | + | |
88 | 145 | | |
89 | 146 | | |
90 | 147 | | |
| |||
94 | 151 | | |
95 | 152 | | |
96 | 153 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 154 | + | |
104 | 155 | | |
105 | 156 | | |
106 | 157 | | |
107 | 158 | | |
108 | 159 | | |
109 | | - | |
| 160 | + | |
110 | 161 | | |
111 | 162 | | |
112 | 163 | | |
113 | 164 | | |
114 | 165 | | |
115 | | - | |
| 166 | + | |
116 | 167 | | |
117 | 168 | | |
118 | 169 | | |
| |||
0 commit comments