lit-ui-router / UiSrefDirective
Class: UiSrefDirective
Defined in: packages/lit-ui-router/src/ui-sref.ts:249
Directive class that creates state-based navigation links.
This directive is used internally by the uiSref directive function. It transforms elements (typically <a> tags) into UI-Router navigation links by setting the href attribute and handling click events.
See
- uiSref for the public API
- AsyncDirective
- StateService.go
Extends
Properties
| Property | Type | Default value | Description | Defined in |
|---|---|---|---|---|
href | string | null | null | the href computed for the target, or null when there is none | packages/lit-ui-router/src/ui-sref.ts:269 |
options | TransitionOptions | {} | the transition options from the last render | packages/lit-ui-router/src/ui-sref.ts:255 |
params | RawParams | {} | the target state params from the last render | packages/lit-ui-router/src/ui-sref.ts:253 |
state | string | null | null | the target state name from the last render | packages/lit-ui-router/src/ui-sref.ts:251 |
targetState | | TargetState | null | null | the resolved target, or null until the router is found | packages/lit-ui-router/src/ui-sref.ts:271 |
uiSrefOptions | UiSrefOptions | {} | this directive's own options, stripped from the transition options | packages/lit-ui-router/src/ui-sref.ts:266 |
Methods
getOptions()
ts
getOptions(opts?): TransitionOptions;Defined in: packages/lit-ui-router/src/ui-sref.ts:304
the transition options with relative defaulted to the enclosing view
Parameters
| Parameter | Type |
|---|---|
opts | TransitionOptions |