Paths
The route path
property has some more advanced tricks up its sleeve.
Some path
tricks are very powerful for all kinds of things. But with great
power comes great responsibility. Parent segments and absolute paths are not
necessarily recommended practice. Use them wisely.
Specifying trailing slashes for example. They need no special treatment, if you want trailing slashes, just write them in the route configation.
<Todos path="todos/">
Some filesystem navigation syntax like .
and ..
is also supported.
<TodosLayout path="todos">
<Todos path="./" />
<Todo path=":todoId" />
</TodosLayout>
<App path=":language">
<Todos path="todos" />
<FrenchTodos path="../fr/todos" />
</App>
Or combined with the splat to match the last segment of an url.
<File path="files/*/../2024" />
Even absolute paths are allowed.
<App path=":language">
<Admin path="admin">
<Users path="users/:userId">
<FirstUser path="/en/admin/users/1" />
</Admin>
</App>