router/route_match library
Classes
- RouteMatch
-
A matched route: the pattern that matched, the concrete path, and any
extracted path params (e.g.
/nodes/:idagainst/nodes/web-01yields{id: web-01}).
Functions
-
hashToPath(
String hash) → String -
Normalizes a URL hash (
#/foo) to a path (/foo); empty hash →/. -
matchRoute(
List< String> patterns, String path) → RouteMatch -
Matches
pathagainstpatterns, returning the first match. Patterns use:namesegments for parameters. Pure and DOM-free.