@tux wrote:
Hello!
I using ionic 1.3.1 and have issue with removing modal on back button 'tap'
It won't hinding by pressing back button, but state has changed
Here the code.controller('JobDetailCtrl', function($scope, $stateParams, $state, $ionicModal) { $ionicModal.fromTemplateUrl('templates/modal-abuse.html', { scope: $scope, animation: 'slide-in-up', hardwareBackButtonClose: true }).then(function(modal) { $scope.modalAbuse = modal; }); $scope.openModal = function() { $scope.modalAbuse.show(); }; $scope.closeModal = function() { $scope.modalAbuse.hide(); }; // Cleanup the modal when we're done with it! $scope.$on('$destroy', function() { $scope.modalAbuse.remove(); }); // Execute action on hide modal $scope.$on('modal.hidden', function() { // Execute action }); // Execute action on remove modal $scope.$on('modal.removed', function() { // Execute action }); })
Template
<button ng-click="modalAbuse.show()" class="button button-assertive icon-left ion-alert">Abuse</button>
Posts: 1
Participants: 1