Angular Material - Angular Material Swipe - Angular Material Tutorial
What is Swipe in Angular Material?
- Swipe functionality is meant for mobile devices. Following directives are used to handle swipes.
- md-swipe-down, an Angular directives is used to specify custom behavior when an element is swiped down.
- md-swipe-left, an Angular directives is used to specify custom behavior when an element is swiped left.
- md-swipe-right, an Angular directives is used to specify custom behavior when an element is swiped right.
- md-swipe-up, an Angular directives is used to specify custom behavior when an element is swiped up.
learn angular material tutorials - swipe design in mobile Example
Related Tags - angular material , angular 2 material , angular material 2 , angular material design , material angular
Usage:
- You might want to take a look at the index.html file inside the example folder.
- The directive swipe can be used as a class or as an attribute.
- Then inject callbacks on right and left swipe, and template customization like so:
- Note that swipe-left and swipe-right are functions, left-template and right-template are whatever templates you want. Note that the color of the swipeable block can be modified by overriding the following CSS property: swipeable-color (default value = '#fff'; the white color from the material design base colors).
Example:
- The following example showcases the use of md-swipe-* showcase uses of swipe components.