Search.../

data

Sets or gets the data to pass with the response.

Description

A data object to be used by the page routed to. The page routed to accesses the data passed to it using the getRouterData() function of wix-window-frontend with optional data and HTML header.

Type:

ObjectRead & Write

Was this helpful?

Get the data that is passed with the response

Copy Code
1export function myRouter_Router(request) {
2
3 let data = response.data;
4 /*
5 * {
6 * "title": "A",
7 * "imageSite": "https://static.wixstatic.com/media/",
8 * "image": "b8f383e0fe2b478ea91362b707ef267b.jpg"
9 * }
10 */
11
12}
Set the data that is passed with the response

Copy Code
1export function myRouter_Router(request) {
2
3 response.data = {
4 "title": "A",
5 "imageSite": "https://static.wixstatic.com/media/",
6 "image": "b8f383e0fe2b478ea91362b707ef267b.jpg"
7 };
8
9}