getRouterData( )


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 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.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<object>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?