0

Am new to AngularJs, I want to write a custom function when user clicks browser back button.

This is my function in my controller. It should invoke when user clicks browser back button.

$scope.backBrnClick = function(){
         var userId=1;
         $rootScope['backup']['sesionId']=null;
    };

How can I achieve this function in Angular JS.

KSK
  • 636
  • 1
  • 9
  • 29
  • 2
    http://stackoverflow.com/questions/14070285/how-to-implement-history-back-in-angular-js – AlainIb Jan 13 '16 at 10:24
  • Thanks for your reply. Actually I want to invoke my function when click browser back button. In those examples all related ng-click event. – KSK Jan 13 '16 at 12:26

0 Answers0