-1
Guys, I’m having a problem in my studies in Nativescript/Angular, I’m trying to insert a value of a Slider inside a Label the slider is in the following:
<Slider value="1" minValue="0" maxValue="100"
(valueChange)="onSliderValueChange($event)">
</Slider>
And the TS file is as follows:
onSliderValueChange(args) {
let slider = <Slider>args.object;
console.log(`valor recebido do Slider ${args.value}`);
}
Until then everything was quiet, and in the console shows the value of the slider( ${args.value} ) but I didn’t understand how I manipulate the text element inside the label to insert this value.
How is my label:
<Label id="label1" text="Valor do Slider Aqui" textWrap="true"></Label>
Could someone help me? Because the example shown in the documentation didn’t help me much.
I think I was not very clear, sorry, I need to know how I manipulate the text element of Label to insert in it the value of Slider.
– Jonata Santos
The value of the slider is assigned to the value property of your understood component?
– Eduardo Vargas
I get it, thank you!
– Jonata Santos
@Jonatasantos, if possible, choose this answer as the best.
– Matheus Franco