# Class LocalStorageHistoryController

This component acts like the HistoryController excepts that is saves the QueryStateModel in the local storage.
This will not allow 'back' and 'forward' navigation in the history, like the standard HistoryController allows. Instead, it load the query state only on page load.
To enable this component, you should set the SearchInterface.options.useLocalStorageForHistory as well as the SearchInterface.options.enableHistory options to true.

## Index

### Methods

- debugInfo
- disable
- enable
- withoutThoseAttribute

### Properties

- disabled
- logger
- ID

### Constructors

- constructor

## Methods

### debugInfo

- debugInfo(): any

- Inherited from BaseComponent.debugInfo

  - Defined in ui/Base/BaseComponent.ts :41

  Return the debug info about this component.

  #### Returns any

### disable

- disable(): void

- Inherited from BaseComponent.disable

  - Defined in ui/Base/BaseComponent.ts :52

  Disable the component. Normally this means that the component will not execute handlers for the framework events (query events, for example). Components are enabled by default on creation.

  #### Returns void

### enable

- enable(): void

- Inherited from BaseComponent.enable

  - Defined in ui/Base/BaseComponent.ts :61

  Enable the component. Normally this means that the component will execute handlers for the framework events (query events, for example). Components are enabled by default on creation.

  #### Returns void

### withoutThoseAttribute

- withoutThoseAttribute(attributes: string[]): void

- - Defined in controllers/LocalStorageHistoryController.ts :54

  Specifies an array of attributes from the query state model that should not be persisted in the local storage

  #### Parameters

  - ##### attributes: string[]

  #### Returns void

## Properties

### disabled

disabled: boolean

Inherited from BaseComponent.disabled

- Defined in ui/Base/BaseComponent.ts :23

A disabled component will not participate in the query, or listen to ComponentEvents.

type

  {boolean}

### logger

logger: Logger

Inherited from BaseComponent.logger

- Defined in ui/Base/BaseComponent.ts :18

Allows component to log in the dev console.

### Static ID

ID: string

Inherited from BaseComponent.ID

- Defined in ui/Base/BaseComponent.ts :28

The static ID that each component needs in order to be identified.
For example, SearchButton -> static ID: SearchButton -> className: CoveoSearchButton

## Constructors

### constructor

- new LocalStorageHistoryController(element: HTMLElement, windoh: Window, model: Model, queryController: QueryController): LocalStorageHistoryController

- - Defined in controllers/LocalStorageHistoryController.ts :21

  Create a new LocalStorageHistoryController instance

  #### Parameters

  - ##### element: HTMLElement

  - ##### windoh: Window

    For mock purpose

  - ##### model: Model

  - ##### queryController: QueryController

  #### Returns LocalStorageHistoryController

### Hierarchy

- RootComponent

### Implements

- IHistoryManager