Open digz6666 opened 8 years ago
I have a simple controller as following, but onStop and unload hooks called twice when pressing back button.
Why it's running twice? Is there any way to prevent it from running multiple times? When I press on links it runs single time:
LoginController = RouteController.extend({ onStop: function() { // page unload console.log('onStop'); }, unload: function() { // page unload console.log('unload'); history.go(-1) } });
does it happen if you remove the history.go?
history.go
It is not happening when i remove history.go. Any other preferred solutions?
When I press on links to go to other page, then unload and onstop hook run once.
I have a simple controller as following, but onStop and unload hooks called twice when pressing back button.
Why it's running twice? Is there any way to prevent it from running multiple times? When I press on links it runs single time: