@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.clientswhich 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 stateAt 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 theapp.clientslist view that I would like to go back to. Any way to make theapp.clientstate always go back toapp.clients, regardless of how we got there? Thanks so much for any advice!
Posts: 1
Participants: 1