---
url: >-
  https://lit-ui-router.dev/reference/lit-ui-router-signals/interfaces/RouterSignalControllerOptions.md
---
[lit-ui-router-signals](../index.md) / RouterSignalControllerOptions

# Interface: RouterSignalControllerOptions\<T>

Defined in: [router-signal-controller.ts:10](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-signals/src/router-signal-controller.ts#L10)

Options for [RouterSignalController](../classes/RouterSignalController.md).

## Extends

* [`SignalControllerOptions`](SignalControllerOptions.md)<`T`>

## Type Parameters

| Type Parameter |
| ------ |
|  `T` |

## Properties

| Property | Type | Description | Inherited from | Defined in |
| ------ | ------ | ------ | ------ | ------ |
|  `equals?` | (`a`, `b`) => `boolean` | Comparer deciding whether the selected value changed, passed to the selector's `Signal.Computed`. Defaults to `Object.is`. | [`SignalControllerOptions`](SignalControllerOptions.md).[`equals`](SignalControllerOptions.md#equals) | [signal-controller.ts:24](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-signals/src/signal-controller.ts#L24) |
|  `initialValue?` | `T` | Value exposed on `.value` before the first read — that is, before `hostConnected`, and on any host that renders while disconnected (SSR). Without it `.value` is `undefined` until the host connects. | [`SignalControllerOptions`](SignalControllerOptions.md).[`initialValue`](SignalControllerOptions.md#initialvalue) | [signal-controller.ts:18](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-signals/src/signal-controller.ts#L18) |
|  `onChange?` | (`value`) => `void` | Invoked (before `host.requestUpdate()`) whenever the selected value changes — and once on every host (re)connect. Use for effects such as resetting component state from route params. | [`SignalControllerOptions`](SignalControllerOptions.md).[`onChange`](SignalControllerOptions.md#onchange) | [signal-controller.ts:11](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-signals/src/signal-controller.ts#L11) |
|  `router?` | | [`UIRouter`](https://ui-router.github.io/core/docs/latest/classes/_router_.uirouter.html) | (() => | [`UIRouter`](https://ui-router.github.io/core/docs/latest/classes/_router_.uirouter.html) | `undefined`) | Explicit router instance, or a thunk returning one. When omitted (or the thunk returns `undefined`), the controller takes the router an enclosing [`withRouterSync`](https://lit-ui-router.dev/reference/lit-ui-router/core/withRouterSync) scoped at construction (a server render), and otherwise asks the nearest router provider on `hostConnected` over `context-request` (via [requestRouter](https://lit-ui-router.dev/reference/lit-ui-router/core/requestRouter) with `subscribe: true`). A discovered router is rebound when a subscribed provider hands over the router that replaces its placeholder. An explicit or scoped router is read at construction, so `.value` is live before the host connects. A thunk is resolved at construction and again on each `hostConnected`; a router it returns replaces the one followed, as [RouterSignalController.setRouter](../classes/RouterSignalController.md#setrouter) does. An explicit router is never replaced by one a provider hands over. | - | [router-signal-controller.ts:29](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-signals/src/router-signal-controller.ts#L29) |
