Constructor
new GuardContext(optionsopt)
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
Context sources. Properties
|
- Source:
Members
app :object|null
The application instance.
Type:
- object | null
- Source:
bridges :object
Registered bridges, by name.
Type:
- object
- Source:
router :object|null
The router performing this navigation.
Type:
- object | null
- Source:
Methods
bridge(name) → {any}
Looks a bridge up by name.
Returns undefined rather than throwing for an unknown name, so a guard
can decide what an absent bridge means. A guard that imports its bridge
directly does not need this; it exists for guards registered as plain
functions, and for looking a bridge up dynamically.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The registered bridge name. |
- Source:
Returns:
The bridge, or undefined when it is not registered.
- Type
- any