ng2-swipeable-card
A small standalone Angular2 plugin that allows your card component to either swipe left or right. To view the live demo, please visit https://ng2-swipeable-card.firebaseapp.com/ (You can also try to open from your mobile device 🎉)!
Installation
npm install --save ng2-swipeable-card
Usage
For webpack consumers, first, import SwipeableCardModule
to your entry AppModule
file,
// Root app module file ; ; ; ;
Then, import ng2-swipeable-card
and hammerjs
in your vendor.ts
file,
// vendor.ts file ; ; ... ; ;
Lastly, simply add your content between swipeable-card
tags to consume swipeable-card styles like box-shadow and default padding. Example markup for a list of swipeable cards that you can swipe either left or right.
;
Getting Started
Dependencies Prerequisites
Make sure you have Node version >= 5.11 and NPM >= 3
If you have
nvm
installed, which is highly recommended (brew install nvm
) you can do anvm install --lts && nvm use
in$
to run with the latest Node LTS. You can also have thiszsh
done for you automatically.
Once you have those, you should install these globals with npm install --global
:
webpack
(npm install --global webpack
)webpack-dev-server
(npm install --global webpack-dev-server
)typings
(npm install --global typings
)
Running Development
Once you have installed all prerequisites,
fork
this repoclone
your forknvm use
use the node version from .nvmrcnpm install
to install all dependenciesnpm run typings
to install all related typingsnpm start
to run our demo app locally
If you are having issues setting up your local development, try
rm -rf node_modules && npm cache clean
, and re-runnpm install
. If issues still persist, please file an issue.
Credits
License
MIT © Jay Kan