Class: UrlParamAdapter

Oracle® JavaScript Extension Toolkit (JET)
10.1.0

F37996-01

Since:
  • 8.0.0
Module:
  • ojurlparamadapter

QuickNav

Description

UrlParamAdapter class

A URL adapter that uses a query parameter to synchronize router state (?_ojCoreRouter=...). All other query parameters are unaffected.

An alternative to UrlParamAdapter is UrlPathAdapter.


Usage

Signature:

class UrlParamAdapter<P extends {[key: string]: any} = {[key: string]: any}>

Generic Parameters
ParameterDescription
PParameters object for the router state
Typescript Import Format
//This class is exported directly as module. To import it
import UrlParamAdapter= require("ojs/ojurlparamadapter");

For additional information visit:


Constructor

new UrlParamAdapter

Methods

getRoutesForUrl : {Array.<CoreRouter.Route.<P>>}

Build all routes for the current router query parameter.
Returns:
An array of routes starting from the path for the given router.
Type
Array.<CoreRouter.Route.<P>>

getUrlForRoutes(routes) : {string}

Build the URL path for the given routes.
Parameters:
Name Type Description
routes Array.<CoreRouter.Route.<P>> The set of routes from which the URL will be built.
Returns:
The full URL representative of the given routes
Type
string