Skip to content

AngularJS swiping effect directive that works also on Windows Mobile Phones

License

Notifications You must be signed in to change notification settings

allexcd/angularjs-custom-swiping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angularjs-custom-swiping

Swiping effect directive that works on Internet Explorer Mobile.

IE Mobile can give lots of headaches since it knows nothing about touch events, using pointer events instead.

For now, this directive use mouse events to simulate a swipe for IE Mobile and desktop browsers. In IE Mobile, pointer events can be used to simulate a swipe effect. Touch events are not supported.

Pointer events use MS prefixes in IE 10 (MSPointerDown, MSPointerMove etc) but in IE 11 this prefix has been removed. Who knows what's going to happen in IE 12 and so on.

That's why this directive avoids pointer events at this time and all conditionals needed to check for them.

Dependencies

To use this directive in your projects, you must include its dependencies. Asumming you already have angular and jquery libraries included in your project, you're going to need the main directive file: customSwiping.js

Usage

Once you've checked that everything is in place, you can use this directive like so:

<custom-swiping left="swipeLeftCallback" right="swipeRightCallback">
  Content
</custom-swiping>

or

<custom-swiping left="swipeLeftCallback">
  Content
</custom-swiping>

or

<custom-swiping right="swipeRightCallback">
  Content
</custom-swiping>

Demo

http://embed.plnkr.co/CnxLCNyquBsEDeqn7Dbz/preview

http://plnkr.co/edit/CnxLCNyquBsEDeqn7Dbz?p=info

About

AngularJS swiping effect directive that works also on Windows Mobile Phones

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published