appcelerator - Titanium if attribute and Alloy.Globals not working -
according documentation possible to:
in xml markup, add if attribute element , assign property passed createcontroller() method. prefix property name $.args namespace. based on property passed method, application displays different label.
so means if put:
<label if="alloy.globals.property" color="blue">foobar</label
wont work?? right i´m not using createcontroller method, because added on xml require tag. there way this?
as can see in docs there examples.
one of which:
<alloy> <window> <label if="$.args.foobar" color="blue">foobar</label> <label if="$.args.foobaz" color="red">foobaz</label> </window> </alloy>
so yes, work. long property provide set when rendering. once variable changes while view open won't update it. you'll need data binding
Comments
Post a Comment