addNodemethods to add routes.
name: the route name
path: the route path, relative to its parent
forwardTo: if specified, the router will transition to the forwarded route instead. It is useful for defaulting to a child route
defaultParams: an object of default params to extend when navigating and when matching a path
encodeParams(stateParams): a function of state params returning path params. Used when building a path given a route name and params (typically on start and navigation).
decodeParams(pathParams): a function of path params returning params. Used when matching a path to map path params to state params.
decodeParams: one can't be used without another, and applying one after another should be equivalent to an identity function.
children), in which case route names are relative to their parent.
.add()accepts single or multiple nodes, flat or nested.
router.setRootPath(path). It can be used for example to list a number of allowed query parameters for all routes in strict query parameters mode (