ionic实现点击popup区域外部分来关闭popup

var htmlEl = angular.element(document.querySelector('html'));
htmlEl.on('click', function (event) {
  if (event.target.nodeName === 'HTML') {
    if (myPopup) {//myPopup即为popup
      myPopup.close();
    }
  }
});

原文地址:https://www.cnblogs.com/nullman/p/5970203.html