Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49076

Is it possible to alter the back button behavior for a single view?

$
0
0

@ggoforth wrote:

Working through a sidemenu app that's going great so far. Having one issue I'm unsure of how to fix. Is it possible to conditionally change the back button (Or history stack I guess) for a single view? My workflow is this:

  • Navigate to state app.clients which shows a list view of all clients.
  • In the footer there is a "Add Client" button that navigates to app.addClient
  • Fill out the form which uses a service to submit the form data to my rest api.
  • On success, we do a $state.go('app.client', {clientId: res.data._id}) which does take us to the client detail state

At this point the history stack looks like [app.clients, app.addClient, app.client] so when I land on that final state, going back actually takes me back to the form, instead of the app.clients list view that I would like to go back to. Any way to make the app.client state always go back to app.clients, regardless of how we got there? Thanks so much for any advice!

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>