I am having problem with the repeater element where by clicking a button, it should take me to a dynamic page. The code looks pretty simple and it keeps saying linkToDynamicPage is not defined
import wixLocation from ‘wix-location’ ;
$w( “#repeater1” ).onItemReady(($w, dataItem, index) => {
let linkToDynamicPage = dataItem[ “title” ];
});
$w( ‘#vectorImage2’ ).onClick(() => {
[wixLocation.to(linkToDynamicPage);](wixLocation.to(linkToDynamicPage);
})
[});](wixLocation.to(linkToDynamicPage);
})