Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

How to disable back button for ionic modal

$
0
0

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 :smile:


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>