I would like to change a variable of the previous view before going back with $ionicHistory.goBack(); I have a ‘login’ view with a login form and a link to a ‘forgot password’ view. When the user clicks on the link, the ‘forgot password’ view opens and the back button shows up to go back to the ‘login’ view. When the user fills in his email address and submits the form to reset his password, I redirect back to the login view with $ionicHistory.goBack(). What I like to do, is to show a message above the login form that the user received a mail to reset his password. To show this message I would like to use ng-if=“showResetMessage” with a boolean. Before calling goBack() I would like to change this boolean to ‘true’.
Both views have their own ui-router states, templates and controllers. In the loginController a have a boolean called ‘showResetMessage’ and in the resetController I call the goBack() function and would like to change the boolean. Any ideas?