Service to allow to close a popup by clicking outside it's bounds
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
bower.json
ionic-close-popup.js
package.json

README.md

ionic-close-popup

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

alt

Install

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'])

Usage

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.