Hey,
Here are my controllers
myApp.controller('MyCardsCtrl', function($scope, $http, $ionicSwipeCardDelegate) {
console.log('MyCardsCtrl');
$scope.cards = [];
$scope.addCard = function(img, name) {
var newCard = {image: img, title: name};
newCard.id = Math.random();
$scope.cards.unshift(angular.extend({}, newCard));
};
$scope.addCards = function(count) {
$http.get('http://api.randomuser.me/?results=' + count).then(function(value) {
angular.forEach(value.data.results, function (v) {
$scope.addCard(v.picture.medium, v.email);
});
$scope.showCards = true;
console.log($scope.cards);
});
};
$scope.addCards(1);
$scope.cardSwiped = function(index) {
$scope.addCards(1);
console.log('cardSwiped');
console.log($scope.cards);
};
$scope.cardDestroyed = function(index) {
$scope.cards.splice(index, 1);
};
})
myApp.controller('MyCardCtrl', function($scope, $ionicSwipeCardDelegate) {
$scope.doAnything = function() {
var card = $ionicSwipeCardDelegate.getSwipeableCard($scope);
card.swipe();
};
});
below is my html content
Swipe down for a new card
{{card.title}}
Like
Disklike
Need help in fixing the issue. I used the same css mentioned in the https://devdactic.com/swipeable-cards-ionic/