Skip to content

lit-ui-router / UiSrefDirective

Class: UiSrefDirective

Defined in: packages/lit-ui-router/src/ui-sref.ts:120

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:140
optionsTransitionOptions{}the transition options from the last renderpackages/lit-ui-router/src/ui-sref.ts:126
paramsRawParams{}the target state params from the last renderpackages/lit-ui-router/src/ui-sref.ts:124
statestring | nullnullthe target state name from the last renderpackages/lit-ui-router/src/ui-sref.ts:122
targetState| TargetState | nullnullthe resolved target, or null until the router is foundpackages/lit-ui-router/src/ui-sref.ts:142
uiSrefOptionsUiSrefOptions{}this directive's own options, stripped from the transition optionspackages/lit-ui-router/src/ui-sref.ts:137

Methods

getOptions()

ts
getOptions(opts?): TransitionOptions;

Defined in: packages/lit-ui-router/src/ui-sref.ts:175

the transition options with relative defaulted to the enclosing view

Parameters

ParameterType
optsTransitionOptions

Returns

TransitionOptions