View difference between Paste ID: CwFxrHdZ and YGR2v4xw
SHOW: | | - or go back to the newest paste.
1
        $scope.swipe_listener = function(event) {
2
            console.log(event.gesture.direction + " " + $scope.workout_form);
3
            if($scope.workout_form){
4
                if (event.gesture.direction == 'left' && $scope.workout_form.$valid) {
5
                    $scope.next_workout();
6
                    console.log('next workout');
7
                }
8
            }
9
10
            if (event.gesture.direction == 'right' && $scope.current_workout_index != 0) {
11
                $scope.previous_workout();
12
            }
13-
        };
13+
        };
14
15
        $scope.swipe_gesture = $ionicGesture.on('swipe', $scope.swipe_listener, document.getElementsByTagName('body'));