documentcloud/backbone — pull request #1910 by brandonminch (2012-12-13 05:20:24+00:00)
Title: Add Router.previous to retrieve/trigger previous route

In many Backbone apps there is the need to retrieve and/or navigate to the previous route in Backbone's history (e.g., clicking a back button, closing a modal etc.). Instead of having to manually track the previous route, I suggest adding a `Router.previous` method to save the previous route back into the history and trigger if desired. Similar to `Router.navigate`, the `previous` method will proxy `Backbone.history.navigate`, passing the previous route fragment by default and accepting the same `options` object.