Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Using Ionic - Javascript Events

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 324
    Comment on it

    In this article, you will learn about the javascript ionic events. These events are useful when you want to interact your web application pages with user.
    These are ionic events:

    • on-hold : It is called when user touches screen for more than 500ms.
    • on-tap : It is called when user touches screen for less than 250ms.
    • on-double-tap : It is called when user does double tap on touch screen.
    • on-touch : It is called at the time when user touches the screen.
    • on-release : It is called when touch is released.
    • on-drag : It is called when user touches the screen and move around the screen in any direction without releasing.
    • on-drag-up : It is called when any html element is dragged up.
    • on-drag-right : It is called when any html element is dragged to right.
    • on-drag-left : It is called when any html element is dragged to left.
    • on-drag-down : It is called when any html element is dragged down.
    • on-swipe : It is called when user drags element in high velocity moving in any direction.
    • on-swipe-up : It is called when user drags element in high velocity moving upwards.
    • on-swipe-right : It is called when user drags element in high velocity moving to right direction.
    • on-swipe-left : It is called when user drags element in high velocity moving to left direction.
    • on-swipe-down : It is called when user drags element in high velocity moving downwards.

    Using Events:

    You can use these ionic events by just adding them on element. Here we have created a button and add on-touch event that will call onTouchFunction() that is defined in javascript file.

    <button on-touch = "onTouchFunction()" class="button">click here</button>
    $scope.onTouchFunction = function() {
       // Do something...
    }

    when touch event will be called the function onTouchFunction() executes.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: