I’m using Nativescript with Angular to build for Android and iOS. I want to know how to use the tag i.e. how do I add items to select to the ListPicker as well as how the code would look in my ts file to capture the input from the ListPicker.
I also would like to know how to use the tag and to display the current value of the Slider and what my ts file would look like to capture input from the Slider. I have a tag set up as follows: but the Slider does not behave as if it is moving in 0.25 increments but in whole number increments i.e. 1 to 2 and 2 to 3.
Thanks for any help.
You could use the two way binding of the ListPicker to access the
selectedIndexof the picker. Simply use the angular 2 two way binding syntax [(ngModel)] and set it to a number property of your component:and here is an example of the code behind of such angular component:
This code snippet is taken from this example from the nativescript-ui-samples-angular github repo, you can find a lot of useful examples there.