In this example I’m trying to get the ux:Property
from Javascript when I click an object. But I get null
.
How can I get a Property
from JS when I click the Class?
<App>
<Panel>
<Panel ux:Class="MyClass">
<string ux:Property="Var" />
<JavaScript>
function MyClassClicked(args) {
console.log(this.Var);
console.log(JSON.stringify(args));
}
module.exports = {
MyClassClicked: MyClassClicked
};
</JavaScript>
<Text Value="Click me and see debug!" TextColor="#000" TextAlignment="Center" Alignment="VerticalCenter">
<Clicked Handler="{MyClassClicked}" />
</Text>
</Panel>
<MyClass Var="My Text" />
</Panel>
</App>
Thanks!