I’m writing a code but I can’t get a value of a range from html page. I’m working on this(I want to set the brightness of a device) :
<ion-item>
<ion-range [(ngModel)]="BrightnessValue" color="dark" pin="true" step="1" min="0" max="10">
<ion-icon range-left small name="sunny"></ion-icon>
<ion-icon range-right name="sunny"></ion-icon>
</ion-range>
</ion-item>
In my ts :
......
BrightnessValue: number ;
....
constructor(....){
console.log(this.BrightnessValue);
Brightness.setBrightness(this.BrightnessValue);
}
But the value is always undefinde. So how can I send from html -> ts ?