0

I have a working ionicPopup which closes on a time limit. Is it possible to make it close on a single/double tap on anywhere on the screen? I know I can set a close button, but thats not really what I need. I need a simple dismiss method, and a tap on the screen I think is the more practical.

Code:

  var errorPopup = $ionicPopup.show({
     scope: $scope,
     title: 'Unexpected Error',
     templateUrl: 'error.html'
    });

  $timeout(function() {
   errorPopup.close();
  }, 3000);
}

And another question, I have a bunch of hyperlink tags within my html code. But when I run my app ionic puts a 1px border around each hyperlink. Is it possible to remove somehow the "" tag border. I know it should be a CSS thing, but I don’t want to modify the original ionic style, but would prefer to override that segment with another. Any gurus out there can help?

Solution: (Link)

<div class="col text-center">
  <a class="item dash-link" id="link" href="#" onclick="window.open('http://www.example.com', '_blank', 'location=no'); return false;">
  <img ng-src="img/icons/example.png" height="80" width="80"></a>
  <br>
  GMail
</div>

CSS:

#link {
    text-decoration:none;
    border:0;
    outline:none;
}
Community
  • 1
  • 1
user3047017
  • 21
  • 1
  • 7

1 Answers1

0

This is a service to achieve this behavior.

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);
nicfo
  • 450
  • 4
  • 12