Skip to content

AppOrchestra/ionic-swing

 
 

Repository files navigation

ionic-swing

ionic-swing is a fork of the following projects intended to add the swipeable cards capatibilies to Ionic (>= 2)

The main reason behind this fork is that I was facing a problem with hammerjs, which was freezing the scrolling of my application on iOS and Android devices when I was using (swipe) on a list or on an ion-scroll.

After having unsuccessfully tried many solutions I was thinking, after all, that Ionic already include is own version of hammer.

Therefore I decided to create this fork with the goal to make a version of swing.js which doesn't embed any external hammerjs.

Current status

This fork project is in version beta but seems to work (tested with Ionic 3.1.0).

Possible improvements not yet done:

  • Improve typescripting and remove class swing.ts
  • The fork special dependencies are, inherited from swing.js, raf, rebound, sister, vendor-prefix. To spare size of my application (smaller bundle = faster boot), it should be checked if these can't be replaced with native code or smaller libs.

Installation

To install this library, run:

$ npm install ionic-swing --save

Usage

1. Import the IonicSwingModule

In your app.module.ts, import the library like following:

import {IonicSwingModule} from 'ionic-swing';

and add it to your imports:

imports: [
    ...
    IonicSwingModule
    ...
]

2. To implement a card stack

To implement a card stack, follow the example provided by angular2-swing

See https://github.com/ksachdeva/angular2-swing

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

Side notes

Project structure created with https://github.com/jvandemo/generator-angular2-library

License

MIT © David Dal Busco

About

A fork of swing.js and angular2-swing for Ionic without external hammerjs dependencies

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 88.0%
  • JavaScript 12.0%