Back Buttun Not working in Ionic Ios App


#1

I am beginer in Ionic .

This the code iam used for Backbuttun


and this the controller code

$scope.OnBackButton=function(){
navigator.app.backHistory();


#2

try this

  $ionicPlatform.registerBackButtonAction(function (event) {

    $ionicHistory.goBack();


    },100);

#3

@nitishrajput01 thanks for your answer , Can you explain ?

I am a begginer


#4

Here is reference

http://ionicframework.com/docs/api/service/$ionicPlatform/