Ionic: How to override back button function? -


i need override button function both buttons:

  • the icon on top left corner of nav-bar
  • the hardware button (for example in android)

but 1 specific view, not globally. how can that?

this code android button, while button on navigation bar bit more simple:

android button :

$ionicplatform.registerbackbuttonaction(function (event) {   if($state.current.name=="home"){     alert("button back");   } }, 100); 

ionic button :

you can edit topic , see how have defined menus , views?


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -