Thankfully, AngularJS comes with a nice module called
ngTouch, which allows us to easily add touch and swipe gestures. The
ngTouch file doesn't come as a default with AngularJS and needs to be included separately.
ngTouch file using bower by typing the following command in the terminal:
bower install angular-touch --save
ngTouch by adding the following script file in our
app/index.html file, as highlighted in the following code:
Make sure that
ngTouch is called after AngularJS.
The next step is to add it as a dependency for our app.
We will add it in our
angular.module function in our
app/js/app.js file, as highlighted in the following code:
angular.module('myApp', [ 'ngRoute', 'myApp.filters', 'myApp.services...