1

I don't need any routing, location or window.history change, just prevent default and insert my own function instead. It's also important that the back button will be clickable when the app starts. It seems so simple but somehow i can't write/find a simple solution...

  • please use the search function before you post your own questions. this has been asked several times already. for example here: http://stackoverflow.com/questions/12381563/how-to-stop-browser-back-button-using-javascript – Patrick Kelleter Aug 20 '16 at 09:26
  • Couldn't find an angular solution – user6375701 Aug 20 '16 at 09:30
  • angular solution http://stackoverflow.com/questions/15813850/detect-history-back-using-angular – WalksAway Aug 20 '16 at 09:37
  • Read that post, i don't want to check if "a user entered a page through using the history back button", just the click event. – user6375701 Aug 20 '16 at 09:48
  • whatever is possible / not possible in javascript is possible / not possible in angularjs as well since angularjs is just a javascript framework. so if browsers don't reliably allow to overwrite (or prevent default, as requested) the back button functionality in javascript - there will not be an angularjs solution as well. – Patrick Kelleter Aug 20 '16 at 10:26

0 Answers0