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
hashCode int
The hash code for this object.
no setterinherited
parent RoutePath?
final
path String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useAsDefault bool
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toUrl({Map<String, String>? parameters, Map<String, String>? queryParameters, String? fragment}) String

Operators

operator ==(Object other) bool
The equality operator.
inherited