Dear All,
There is something I do not understand with the code syntax regarding wix-storage.
I have:
Page1
- Input field $w("#InputItemID ")
- Button to open Page2 $w(“#Button1”)
Page2
- Input field $w("#InputItemID ")
I’ve tried so many combinations with no success that now I’m asking for your help.
Page 1 Code
import {local} from ‘wix-storage’;
export function Button1_click(event) {
local.setItem(“key”, “value”);
}
Page 2 Code
import {local} from ‘wix-storage’;
$w.onReady( function () {
let value = local.getItem(“key”); // “value”
}
My problem is that I do not know how to define “key” and “value”
Thank you for your help
Best regards,
Domivax