Santosh
Santosh

Reputation: 297

$ionicHistory is not working in ionic app

In my ionic application i want to implement back button functionality for that i am using $ionicHistory like this

in js file 

 $scope.goBack = function() {


$ionicHistory.goBack(); 

   // window.history.go(-1);

  };
in html

ng-click=goBack();

while going back i can n't see the full view page . It's coming half(50%) of the requested page . can any body help me with this ?

Any help i would appreciate .

Thanks in Advance !!

Upvotes: 1

Views: 209

Answers (1)

Santosh
Santosh

Reputation: 297

I made Few changes in my it is working fine .

   .state('app.profile', {
            cache: false,// disabled cache 
        url: './profile',
        views: {
            'menuContent': {
               // templateUrl: 'templates/profile.html',
                templateUrl: 'templates/profile.html',
                controller: 'ProfileCtrl'
            },
            'fabContent': {
               template: ''
               
            }
        }
    })
    
    in my controller
    
    setTimeout(
  function() 
  {  $scope.goBack = function() {
         console.log('Going back');
$ionicHistory.goBack(); 
  // window.history.go(-1);

        };    
 
      }, 2000);

Thanks All

Upvotes: 1

Related Questions