Closed kryptus36 closed 4 years ago
scope issue. I needed to use $parents in my binding
scope issue. I needed to use $parents in my binding
I am using nativescript-vue and experience the same issue of using multiple conditional templates , could you share me more information of your solution? Thanks.
I am using my listview inside of a nativescript-carousel. So I needed to change the above code to
<lv:RadListView row="1" height="100%" items="{{ list }}" itemTemplateSelector="{{ $parents['Carousel'].potListTemplate }}">```
I found this helpful:
https://docs.nativescript.org/core-concepts/data-binding#binding-to-a-parent-binding-context
Please, provide the details below:
Tell us about the problem
Please, ensure your title is less than 63 characters long and starts with a capital letter.
Which platform(s) does your issue occur on?
Both
Please provide the following version numbers that your issue occurs with:
tns --version
to fetch it) 6.2.2Please tell us how to recreate the issue in as much detail as possible.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
In my js file I have a simple function inside my view model object (which never fires and the default template is always used and the label shows "mdate"):
if I change itemTemplateSelector="mdate" the app crashes .