Skip to content
Swipeable card based layout for Ionic and Angular
JavaScript CSS Other
Branch: master
Clone or download
Latest commit bf01477 Jan 6, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
.gitignore Updated to new Ionic Aug 6, 2014
LICENSE Import Jan 27, 2014
README.md
bower.json Bower Nov 25, 2014
ionic.swipecards.js Fixed Jan 6, 2015

README.md

Ionic Contrib: Swipeable Cards

Swipeable card based layout for Ionic and Angular. As seen in apps like Jelly

Demo

Usage

Include ionic.swipecards.js after the rest of your Ionic and Angular includes. Then use the following AngularJS directives:

<swipe-cards>
  <swipe-card ng-repeat="card in cards" on-destroy="cardDestroyed($index)" on-card-swipe="cardSwiped($index)">
    Card content here
  </swipe-card>
</swipe-cards>

To add new cards dynamically, just add them to the cards array:

$scope.cards = [
  { // card 1 },
  { // card 2 }
];

$scope.cardDestroyed = function(index) {
  $scope.cards.splice(index, 1);
};

$scope.cardSwiped = function(index) {
  var newCard = // new card data
  $scope.cards.push(newCard);
};
You can’t perform that action at this time.