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

Capturing ionChange without a framework

$
0
0

@seantomas wrote:

Is it not possible to listen to ionChange events in the following fashion when not using a framework?

<ion-range id="range" min="0" max="10" ionChange="alert(event.target.value)"></ion-range>

The only way I can get it to work is like this:

<ion-range id="range" min="0" max="10"></ion-range>
<script>
      document.getElementById('range').addEventListener('ionChange', function (ev) {
          alert(event.target.value);
      });
</script>

Am hoping to avoid having to manually add listeners to all of my components if possible.

Thanks for any help!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles