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();
    }
  }
});

posted @ 2016-10-17 16:20  SingleShadow  阅读(2324)  评论(0编辑  收藏  举报