Skip to content

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

Extends

Properties

PropertyTypeDefault valueDescriptionDefined in
hrefstring | nullnullthe href computed for the target, or null when there is nonepackages/lit-ui-router/src/ui-sref.ts:269
optionsTransitionOptions{}the transition options from the last renderpackages/lit-ui-router/src/ui-sref.ts:255
paramsRawParams{}the target state params from the last renderpackages/lit-ui-router/src/ui-sref.ts:253
statestring | nullnullthe target state name from the last renderpackages/lit-ui-router/src/ui-sref.ts:251
targetState| TargetState | nullnullthe resolved target, or null until the router is foundpackages/lit-ui-router/src/ui-sref.ts:271
uiSrefOptionsUiSrefOptions{}this directive's own options, stripped from the transition optionspackages/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

ParameterType
optsTransitionOptions

Returns

TransitionOptions