@ritopls wrote:
Hey guys I just wanted to create a form which uses a range from 1-5 but when i want to access the value it is undefined.
Do u know what i am doing wrong?
Code:<form (ngSubmit)="logForm()"> <!-- Testfall 1 (1-5) --> <ion-item> <ion-label text-wrap>Das ist eine sehr lange Frage die sich nicht in einer Zeile ausgeht?</ion-label> <ion-range min="1" max="5" step="1" snaps="true" color="secondary" id="kindofquestionOne_1"> <ion-label range-left>1</ion-label> <ion-label range-right>5</ion-label> </ion-range> </ion-item> </form>
Try to Access the value:
logForm(){ console.log(document.getElementById("kindofquestionOne_1").value); }
Posts: 1
Participants: 1