BlueSpire/Durandal — pull request #161 by RobJacobs (2013-05-30 12:34:10+00:00)
Title: Adding navigatedTo and NavigatedFrom triggers to the router - completeNavigation

Adding navigatedTo and NavigatedFrom triggers to the router.js - completeNavigation function. The third parameter in the trigger key is the moduleId of the active route. The triggers can be subscribed to like so:

router.on('router:navigatedTo:viewmodels/myViewModel', function () {
alert('Navigated to myViewModel.')
});

router.on('router:navigatedFrom:viewmodels/myViewModel', function () {
alert('Navigated from myViewModel.')
});