CanActivate class

A lifecycle interface that allows conditionally activating a new route.

Component classes should implement this if they will be navigated to as part of a route definition and would like to determine if the route should be allowed.

Some example uses could include only allowing logged in users access to a "profile editor" component (not as a security measure) or to record what the previous route is for analytics before navigating.

Constructors

CanActivate()

Properties

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

canActivate(RouterState current, RouterState next) → Future<bool>
Called by the router when a transition is requested from router states. [...]
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