URL persistence strategy

Edit on GitHub

This document explains the Url Persistence Strategy service in the Components Library.


Url Persistence Strategy is an Angular Service that uses browser URL to store the data.

Check out an example usage of the Url Persistence Strategy.

Service configuration:

  • storage—persistence strategy type.
        type: 'http',
        cache: {
            storage: 'url',

Service registration

Register the service:

declare module '@spryker/persistence' {
    interface PersistenceStrategyRegistry {
        'url': UrlPersistenceStrategy;

    imports: [
            'url': UrlPersistenceStrategy,
export class RootModule {}


Below you can find interfaces for the Url Persistence Strategy:

interface UrlPersistenceStrategy extends PersistenceStrategy {
    save(key: string, value: unknown): Observable<void>;
    retrieve<T>(key: string): Observable<T | undefined>;
    remove(key: string): Observable<void>;