An open API service indexing awesome lists of open source software.

https://github.com/ionic-team/ionic-ion-swipe-cards

Swipeable card based layout for Ionic and Angular
https://github.com/ionic-team/ionic-ion-swipe-cards

Last synced: 2 months ago
JSON representation

Swipeable card based layout for Ionic and Angular

Awesome Lists containing this project

README

          

Ionic Contrib: Swipeable Cards
===================

Swipeable card based layout for Ionic and Angular. As seen in apps like [Jelly](http://jelly.co/)

[Demo](http://ionicframework.com/demos/swipe-cards/)

## Usage

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

```html


Card content here

```

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

```javascript
$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);
};
```