access class property in javascript

Hi guys,

I need access to custom component property in javascript args, how do you that?

Eq:

<Rectangle ux:Class="MButton" Val="etag">
    <string ux:Property="Val" />

</Rectangle>

<MButton ux:Name="btn" Color="#33aaff" Val="btree"  Width="100" Height="50" Alignment="Center"  Clicked="{clickEvent}" />


<JavaScript>
   module.exports={
        clickEvent:function(arg){
             console.log(arg.Val);
        }


   };

</JavaScript>

Hi Hilmi,

the docs say: “All user-defined properties (defined through ux:Property) are automatically reflected as Observable objects in JavaScript modules in the scope of the property.

See more here: Using Properties in JavaScript