Route is a type of RouteDefinition used to route a path to a component.

It has the following properties:

  • path is a string that uses the route matcher DSL.
  • component a component type.
  • name is an optional CamelCase string representing the name of the route.
  • data is an optional property of any type representing arbitrary route metadata for the given route. It is injectable via RouteData.
  • useAsDefault is a boolean value. If true, the child route will be navigated to if no child route is specified during the navigation.

Example

import 'package:angular/router.dart';

@RouteConfig(const [
  const Route(path: '/home', component: HomeCmp, name: 'HomeCmp'),
])
class MyApp {}
Inheritance

Constructors

Route({String name, bool useAsDefault, String path, String regex, RegexSerializer serializer, data, component })
const

Properties

aux → String
final
component → dynamic
final
data → dynamic
final, inherited
hashCode → int
The hash code for this object. [...]
read-only, inherited
name → String
final, inherited
path → String
final, inherited
regex → String
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
serializer → RegexSerializer
final, inherited
useAsDefault → bool
final, inherited

Methods

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 ==(other) → bool
The equality operator. [...]
inherited