What am I trying to achieve?
I aim to hide a div when swiped right. This specific action will close the pop-up that appears after clicking a button.
What tools are at my disposal?
I am utilizing Ionic framework for this task.
Within my app.js, I have included the following function:
$scope.warn = function (message) {
alert(message);
};
In the HTML file containing the div, you can find the code snippet below:
<div on-swipe-right="warn('Must use scope')">....</div>
An alert is triggered upon swipe, indicating the gesture detection is functional.
Now, I need guidance on how to proceed with hiding the div upon right swipe. Should I utilize ng-show
? Or maybe resort to tweaking the CSS instead?