How to disable back button for ionic modal

#1

Is it possible to get or set a state for ionic modal for example:

    <ion-view id="doctors" cache-view="false" view-title="Directorio médico"  ng-controller="DoctorsDirController as doctorsCtrl">
  <ion-content>
              <!-- stuff inside here -->
  </ion-content>  
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            When this modal is open disable android back button
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
    <script id="result-details.html" type="text/ng-template">
      <ion-modal-view id="result-details-modal">
        <ion-content>

        </ion-content>
      </ion-modal-view>
    </script>
</ion-view>

UPDATE

So I needed to disable back button on the modal so I inspected the $scope.modal with google remote inspect and found it has a property for the back button so I se tit to false like this:

$scope.modal.hardwareBackButtonClose = false;

now my problem is gone :slight_smile: