I have a website by mean-stack
.
I want to add a web page https://localhost:3000/A
. This page contains a textarea where people could write a text, it also contains a button go forward to Page B
. Thus clicking on the button leads to https://localhost:3000/B
. Page B
prints the text (which can not be edited) that was written in Page A
. It also contains a button go back to Page A
, which leads back to Page A
.
When we click on go back to Page A
, I don't want the browser to reload https://localhost:3000/A
(ie, execute all the functions in resolve
) ; I just want to go back to the previous state of Page A
(with previous text) right before going to Page B
.
Does anyone know how to achieve this?
PS: Page A
and Page B
have different controllers. Additionally, for some reasons I can NOT enable html5mode
in my website.
$stateProvider
.state('A', {
url: '/A',
templateUrl: 'A.html',
controller: 'ACtrl'
}
.state('B', {
url: '/B',
templateUrl: 'B.html',
controller: 'BCtrl'
}
Edit 1: I tried this solution. The back
button did lead to previous page, which was however reloaded, that's not what I want.