I might be way out and don’t understand something but i’m trying to access the value of a property in javascript and i’m getting nowhere
Here is the Code in my class (the value of PoliciesURL is set when i instantiate the class)
<string ux:Global="PolicyURL" ux:Value="https://mysite.com/terms-and-conditions" />
<Landing ux:Template="landing" router="router" PoliciesURL="PolicyURL" />
<Page ux:Class="Landing" Color="Black">
<object ux:Property="PoliciesURL" />
<JavaScript File="src/Landing.js"/>
<Text Clicked="{gotoPolicies}">Terms of Use</Text>
Showing in UX works perfectly, but javascript, not so much.
This is what i’m doing in my javascript
function gotoPolicies()
{
console.log(this.PoliciesURL);
}
module.exports = { gotoPolicies };
When i click i always get “null”. I’ve read many threads that show stuff like this and it works for them. What am i doing wrong?