Modal.remove the right way to use it


#1

As the documentation state to use Modal.remove. is it for every modal.show need to be removed with modal.remove (after modal.hide)? Or modal.remove only use if switching between page that has modal.

Currently, I have for every modal.show, I close it by modal.hide and followed by modal.remove. is that the right approach?

Also how to “refresh” previously checked checkbox inside modal, every time modal is opened? This is needed since I want list of contact uncheck when creating a new group

thanks in advance


#2

You should / might want to remove the modal when you leave the state that had the modal.

$scope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){
  $ionicModal.remove();
});