Search...
getRouterData( )
Returns the data that a router passed to the page in its response.
Description
When you create a router and define its functionality in its router()
function, you can choose to send data along with the router's response.
That data is retrieved in the code of the page that was routed to using the
getRouterData()
function.
If you call the getRouterData()
function from a non-router page or a router
page that wasn't sent any data, the function returns null
.
Syntax
function getRouterData(): Object
getRouterData Parameters
This function does not take any parameters.
Returns
The data returned by the router.
Return Type:
Object
Related Content:
Was this helpful?
Get the data passed by a router
Copy Code
1import wixWindowFrontend from 'wix-window-frontend';23// ...45let routerData = wixWindowFrontend.getRouterData();