Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Ion-range value undefined

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>