Close Ionic popup when tapping outside it's bounds
Here is a little Codepen to show a live example: http://codepen.io/mvidailhet/pen/JYwYEE
Install it with bower
$ bower install ionic-close-popup
Include the ionic.closePopup
module in your app's dependencies:
angular.module('app', ['ionic', 'ionic.closePopup'])
Register your newly created popup to the closePopupService
service :
var alertPopup = $ionicPopup.alert({
title: 'Alert popup',
template: 'Tap outside it to close it'
});
IonicClosePopupService.register(alertPopup);
That's it! Your popup will close if you tap outside of it.