91
Angular Material – Swipe
Angular Material Swipe function is an angular directive used for mobile devices. The UX pattern is used for mobile devices only, and cannot make the responsive sites. To initiate a swipe gesture on a desktop, you can click, hold and drag in right, left, up or down with the help of swipe function.
The below instructions are used to handle swipe.
- md-swipe-down: It is used to determine the custom behavior when any element is swiped down.
- md-swipe-up: It is used to generate custom behavior when an element is swiped up.
- md-swipe-left: md-swipe-left is an angular directive that is used to specify custom behavior when an element is left swiped.
- md-swipe-right: It specifies custom behavior when an element is swiped right.
Example 1:
The example shows the use of md-swipe- * and uses the swipe components.
am_swipes.html
Output:
Example 2:
app.component.html
app.component.ts
app.component.css
Output:
Next TopicAngular Material Toasts/ Whiteframe