# Ionic Swipe Cards - 'CardCtrl' not logging swipe direction

**URL:** <https://forum.ionicframework.com/t/ionic-swipe-cards-cardctrl-not-logging-swipe-direction/17315>\
**Category:** ionic-v1\
**Created:** [February 9, 2015, 3:51pm UTC](https://forum.ionicframework.com/t/ionic-swipe-cards-cardctrl-not-logging-swipe-direction/17315 "2015-02-09T15:51:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kill86](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/kill86/32/8877_2.png) [@Kill86](https://forum.ionicframework.com/u/Kill86)\
**Post date:** [February 9, 2015, 3:51pm UTC](https://forum.ionicframework.com/t/ionic-swipe-cards-cardctrl-not-logging-swipe-direction/17315/1 "2015-02-09T15:51:37Z")

</div>

Hi there,

I have been working on creating a UI for indicating a user’s preferences using local collide.js and ionic.tdcards.js. I wish to populate an array in $scope with the items the user has indicated a preference for. However, I am having difficulty. The problem is that the swipe direction does not seem to be registering at all when I test in the browser. There is no log to the console for any swipe and it seems as if ‘CardCtrl’ is redundant. I have tried replacing local collide.js and ionic.tdcards.js files with the hosted versions but this has not helped.

I could really do with some advice:

```
.controller('CardCtrl', function($scope, TDCardDelegate) {
    //var userInterests = [];
    //$scope.interests = userInterests;

    $scope.cardSwipedLeft = function (index) {
        console.log('LEFT SWIPE');
        //nothing
        $scope.addCard();

    };
    $scope.cardSwipedRight = function (index) {
        console.log('RIGHT SWIPE');
        //add to array

        $scope.addCard();

    };
```

---

<div class="post-metadata">

**Author:** ![Kill86](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/kill86/32/8877_2.png) [@Kill86](https://forum.ionicframework.com/u/Kill86)\
**Post date:** [February 9, 2015, 3:59pm UTC](https://forum.ionicframework.com/t/ionic-swipe-cards-cardctrl-not-logging-swipe-direction/17315/2 "2015-02-09T15:59:32Z")

</div>

The template markup:

```
 <td-cards>
            <td-card ng-repeat="card in cards" on-destroy="cardDestroyed($index)" on-swipe-left="cardSwipedLeft($index)" on-swipe-right="cardSwipedRight($index)" on-partial-swipe="cardPartialSwipe(amt)" class="card-{{$index}}">
                <div class="image" ng-controller="CardCtrl">
                    <div class="no-text">
                        <img class="imgX" src="img/dislike.png"/>
                    </div>
                    <!--<div class="fave yes-text demo-container tap-to-activate" on-swipe-left='animateStar()'></div>-->
                    <img class="swipeImg" ng-src="{{card.image}}">
                    <div class="yes-text">
                        <img class="imgCheck" src="img/like.png"/>
                    </div>
                </div>
            </td-card>
        </td-cards>

```

The problem appears to be with the functions:

`on-swipe-left="cardSwipedLeft($index)"`

and

`on-swipe-right="cardSwipedRight($index)`

which are not triggering the logging of swipe direction to the console.

---

<div class="post-metadata">

**Author:** ![tribaldavid](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tribaldavid](https://forum.ionicframework.com/u/tribaldavid)\
**Post date:** [March 13, 2015, 3:32pm UTC](https://forum.ionicframework.com/t/ionic-swipe-cards-cardctrl-not-logging-swipe-direction/17315/3 "2015-03-13T15:32:36Z")

</div>

Instead of on-swipe, use on-transition

> **[On-swipe event not funtctioning](http://forum.ionicframework.com/t/on-swipe-event-not-funtctioning/17331/2?u=tribaldavid)**
>
> I had a blogpost about the general usage of Tinder Cards on Nic Raboys blog. However, I experienced the same behaviour like you and wrote an additional article describing how to optimize the use of Tinder Cards. That includes registering for another...
