mvidailhet / ionic-close-popup

Service to allow to close a popup by clicking outside it's bounds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Service to allow to close a popup by clicking outside it's bounds

License:MIT License


Languages

Language:JavaScript 100.0%