The UrlManager controller can parse an url fragment to extract search parameters which affect the search response.

Example: url-manager.ts

interface UrlManager {
    state: UrlManagerState;
    subscribe(listener: () => void): Unsubscribe;
    synchronize(fragment: string): void;
}

Hierarchy (View Summary)

Methods

Properties

Methods

  • Adds a callback that's invoked on state change.

    Parameters

    • listener: () => void

      A callback that's invoked on state change.

    Returns Unsubscribe

    A function to remove the listener.

  • Updates the search parameters in state with those from the url & launches a search.

    Parameters

    • fragment: string

      The part of the url that contains search parameters. E.g., q=windmill&f[author]=Cervantes

    Returns void

Properties

The state relevant to the UrlManager controller.