title: Ionic popup not closing when i select an option
body: <p>The  popup with a list edit is showing when a button clicked.When click on a item in list,an model opens.I need to close the popup when model opens but it doesn't working.</p>
  
  <pre><code>$scope.showPopup = function() {
      $scope.data = {}
  
      $scope.myPopup = $ionicPopup.show({
          template: '&lt;div class="list padding" ng-click="edit()"&gt;Edit&lt;/div&gt;',
          cssClass: 'custom-class',
          scope: $scope,
      });
  };
  $scope.hidePopup = function() {
      $scope.myPopup.close();
  }
  
  $ionicModal.fromTemplateUrl('templates/modal.html', {
      scope: $scope
  }).then(function(modal) {
      $scope.modal = modal;
  });
  $scope.openModal = function() {
      $scope.hidePopup();
      $scope.modal.show()
  }
  $scope.closeModal = function() {
      $scope.modal.hide()
  }
  
  $scope.edit = function() {
      console.log(56646);
      $scope.hidePopup();
      $scope.openModal();
  
  };
  $scope.update = function(item) {
      $scope.closeModal
      console.log(item);
  }
  </code></pre>
  
  <p>please help me?</p>