RoutePath class

Encapsulates a RouteDefinition's basic properties and creates link URLs.

A RoutePath can be separated as another file and define the basic endpoints of the application. Then, this path can be used to create RouteDefinitions and generate URLs. This way, there are no circular dependencies.

RoutePath contactRoute = new RoutePath(
  path: 'contact',
  useAsDefault: true
);

new RouteDefinition(
  routePath: contactRoute,
  component: MyComponentNgFactory,
);

router.navigate(contactRoute.toUrl());

Constructors

RoutePath({String path, RoutePath parent, bool useAsDefault: false, dynamic additionalData })
RoutePath.fromRoutes(Iterable<RouteDefinition> routes)

Properties

additionalData → dynamic
final
parent RoutePath
final
path → String
final
useAsDefault → bool
final
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

toUrl({Map<String, String> parameters, Map<String, String> queryParameters, String fragment }) → String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited