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
Trueand the application components have not issued a router-outlet, the router instance will do it.selector ('router-outlet'):If
autorouterisTrueand the components define no router-outlet for the output of a route, theselectorwill be issued automaticallyrouteContains the
RouteSnapshotcorresponding to the active routeroutesA list of the defined
Routes(children routes are reachable inside theRoute)basehrefThe automatically calculated base href for the app
-
route_to(pathname, *args, **kwargs)¶ As the name indicates, this method routes to:
pathnamepathnameAbsolute or relative path.
.and..are supported as path elementsargsandkwargswill 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
pathnamepathnameURI or Absolute or relative path.
kwargswill be passed as query arguments the route