Returns the data that a router passed to the page in its response.
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
If you call the
getRouterData() function from a non-router page or a router
page that wasn't sent any data, the function returns
function getRouterData(): Object
This function does not take any parameters.
The data returned by the router.
Was this helpful?
Get the data passed by a router
1import wixWindowFrontend from 'wix-window-frontend';23// ...45let routerData = wixWindowFrontend.getRouterData();