Skip to content

lit-ui-router / UiSrefOptions

Interface: UiSrefOptions

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

Directive options for uiSref, passed alongside the transition options in its third argument. These never reach @uirouter/core.

Properties

PropertyTypeDescriptionDefined in
assignHref?boolean | "auto"Where the generated href is written. - true (default in 1.x) — always write it, whatever the element is. This is the historical behaviour and the standing answer for a custom element that declares its own href. - 'auto' — write it only to elements the HTML spec gives an href: <a>, <area>, and SVG <a>. This is the correct behaviour and becomes the default in 2.0. - false — never write it; the app manages the attribute itself. Under true, a non-link that receives an href warns once and names 'auto' as the fix. This option governs the href attribute only. Whether the click handler defers to native browser behaviour is decided by the element itself, never by this setting — see isNativeLink.packages/lit-ui-router/src/ui-sref.ts:106