Class: UrlParamAdapter
Signature:
class UrlParamAdapter<P extends {[key: string]: any} = {[key: string]: any}>
UrlParamAdapter
- Version:
- Since:
- Module:
Module usage
See JET Module Loading for an overview of module usage within JET.
Typescript Import Format
//This class is exported directly as module. To import it
import UrlParamAdapter= require("ojs/ojurlparamadapter");
Generic Parameters
| Parameter | Description |
|---|
| P | Parameters object for the router state |
JET In Typescript
A detailed description of working with JET elements and classes in your typescript project can be found at:
JET Typescript Usage.
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.
Constructor
new UrlParamAdapter
Methods
-
-
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