UISrefActive | UI-Router
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UISrefActive

A directive that adds a CSS class when a uiSref is active.

Purpose

This directive should be paired with a UISref, and is used to apply a CSS class to the element when the state that the uiSref targets is active.

Selectors

  • [uiSrefActive]: When this selector is used, the class is added when the target state or any child of the target state is active
  • [uiSrefActiveEq]: When this selector is used, the class is added when the target state is directly active

Inputs

  • uiSrefActive/uiSrefActiveEq: one or more CSS classes to add to the element, when active
example

<a uiSref="foo" uiSrefActive="active">Foo</a>
<a uiSref="foo.bar" [uiParams]="{ id: bar.id }" uiSrefActive="active">Foo Bar #</a>

Hierarchy

  • UISrefActive

Index

Constructors

Properties

Accessors

Methods

Constructors

Properties

_classes: string[]
_classesEq: string[]
_subscription: Subscription

Accessors

  • set (val: string): void
  • set (val: string): void

Methods

  • ngOnDestroy(): void

Generated using TypeDoc