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
- Host: GitHub
- URL: https://github.com/ionic-team/ionic-ion-swipe-cards
- Owner: ionic-team
- License: mit
- Archived: true
- Created: 2014-01-27T19:36:20.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-12-23T19:34:40.000Z (about 10 years ago)
- Last Synced: 2025-10-01T22:34:14.178Z (4 months ago)
- Language: JavaScript
- Size: 11.4 MB
- Stars: 354
- Watchers: 35
- Forks: 130
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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);
};
```