Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • RouteHandler

Index

Constructors

constructor

Properties

Protected _appContext

_appContext: AppContext

The app context we are handling the routes of

Protected _initialRequest

_initialRequest: boolean

True as long we did not sent at least a single request to the page api

Methods

Protected buildQuery

  • buildQuery(slug: string, queryParams: PlainObject<any>): Promise<JsonApiGetQuery>

handle

  • handle(to: Route, from: Route, next: Function): void
  • Is called in the route component in the beforeRouteEnter() gate and handles the request of new page data from the server

    If the request fails and an status 301 with an route parameter in the response data gets recieved we redirect to the given route.

    Parameters

    • to: Route
    • from: Route
    • next: Function

    Returns void

Protected handleSpecialResponse

  • Internal logic to handle special server responses from the page resource endpoint If a 203 status code was returned by the API we expect an object containing a "type" property that defines how we should handle the response.

    Currently supported types: "redirect": Redirects a request to another website using a 30x status code

    Parameters

    Returns Promise<any>

Generated using TypeDoc