Skip to content
qubeejs/angular
API/provideQubeeBrowserAdapter

provideQubeeBrowserAdapter

function@qubeejs/angularsrc/lib/lists/browser-adapter.ts

Provide an adapter that reads and writes the address bar through the History API, for an application without the Angular Router

Lists navigate with history.pushState() / replaceState() and follow Back and Forward through popstate; every list under the provider stays in sync. A history.pushState() by other code is not seen until the next popstate. With the Angular Router, use provideQubeeRouterAdapter() from @qubeejs/angular/router instead, or the router falls out of step.

bootstrapApplication(AppComponent, { providers: [provideQubeeBrowserAdapter()] });

On the server there is no history: the location is empty and navigating does nothing.

provideQubeeBrowserAdapter(): Provider[]

Returns — The provider for QUBEE_LIST_ADAPTER