Hello guys I have a quick question I searched forums but couldnt find answer
How can I display my observable in parents if I have 2 or 3 of them
like this:
<Button text="{{ $parents['RadListView'].name + " "+ "$parents['RadListView'].surname" ]] }}" />
This above doesnt works or only gives me one item but what if I want two of them or tree displayed ????
iOS/Android/Both
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
@markomiljkovic
There are a number of syntax errors in the your Button XML line.
You have double quotes for your second binding and also some closing brackets at the end that are not needed.
Here is the refactored code that will work
<Button text="{{ $parents['RadListView'].name + ' '+ $parents['RadListView'].surname }}" />
Demo application demonstrating the above syntax can be found here.
Meanwhile, it appears that you might have to manually refresh the list view to update all parents binding in the item templates.
Logging this one as a bug - steps to reproduce use the linked application and
remove the manual refresh of the list. As a result, the binding will appear only for the few first items or only after the list is scrolled.
thank you very much its working :)
Reproducible with tns-core-modules@next
Released with https://github.com/NativeScript/NativeScript/releases/tag/6.5.9 now