Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49339

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 49339

Latest Images

Trending Articles



Latest Images

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