Skip to main content
cngx-src documentation

CNGX_A11Y_STORAGE

Tokenv0.1.0

InjectionToken<Storage | null>

Description#

The Storage backend withPersistence reads from and writes to. Defaults to the browser localStorage, or null on the server (where persistence is skipped). Override it to persist elsewhere - sessionStorage, or a server-backed Storage shim for signed-in users - without forking:

providers: [
  { provide: CNGX_A11Y_STORAGE, useFactory: () => sessionStorage },
  provideA11yPreferences(withPersistence()),
];

Type#

InjectionToken<Storage | null>

Provided in#

'root'