example-restclient-myworkapp-nodejs
example-restclient-myworkapp-nodejs copied to clipboard
Back button on task details is broken if page is reloaded
Navigate to the task detail page and then reload the page. The back button no longer goes back to the task list because the referrer is the same as the current path.
Modify to not set referrer if the path doesn't change or possibly hard code the link in the view to go back to the task list.
public/js/app.js
// Store the current page for back navigation
myTasks.run(function($rootScope, $location) {
$rootScope.$on("$locationChangeStart", function(event, next, current) {
$rootScope.referrer = current;
});
});