Router¶
-
class
Router
(module, submods, routes)¶ Almighty class controlling the routing internals. It is automatically instantiated by the main application Module
Attributes:
autorouter (True)
:If
True
and the application components have not issued a router-outlet, the router instance will do it.selector ('router-outlet')
:If
autorouter
isTrue
and the components define no router-outlet for the output of a route, theselector
will be issued automaticallyroute
Contains the
RouteSnapshot
corresponding to the active routeroutes
A list of the defined
Routes
(children routes are reachable inside theRoute
)basehref
The automatically calculated base href for the app
-
route_to
(pathname, *args, **kwargs)¶ As the name indicates, this method routes to:
pathname
pathname
Absolute or relative path.
.
and..
are supported as path elementsargs
andkwargs
will be passed as arguments to the route
-
back
()¶ Navigate once backwards
-
forward
()¶ Navigate once forward
This method navigates away from the app to the given
pathname
pathname
URI or Absolute or relative path.
kwargs
will be passed as query arguments the route