My Ionic Info :
Cordova CLI : 6.3.1
Ionic Framework Version : 2.0.0-beta.11
Ionic CLI version : 2.1.0-beta.3
Ionic App Lib Version 2.0.0-beta.20
Html :
<ion-content padding>
<form [formGroup]="myForm" (ngSubmit)="submitFunction()">
<ion-item>
<ion-range [(ngModel)]="myRange" name="formRange" formControlname="formRange"></ion-range>
</ion-item>
</form>
<button (click)="myFunction()"> function </button>
{{myRange}}
</ion-content>
In the beginning, my ion-range input will show 2 and the {{myRange}} too
When I'm trying to update it directly with the range, it's ok. The {{myRange}} show the correct value. But if I update it with a function it's not working.
constructor(private builder: FormBuilder) {
this.myRange = 2;
this.myForm = builder.group({
'formRange':this.myRange,
});
}
public myFunction()
{
this.myRange = 9;
}
The display of {{myRange}} will show 9, but the ion-range input will still show 2.
Am I doing something wrong ?