angular-ui/ui-router — pull request #414 by eahutchins (2013-09-12 23:14:36+00:00)
Title: Added a $stateNotFound event which can prevent or redirect state transitions.

Added a $stateNotFound event which can be prevented (in which case `transition aborted` is returned with no error thrown), or redirected by substituting the `redirect` event argument with the desired target state and params. In the latter case the state lookup is always retried once (even when not redirected), potentially allowing lazy-definition of state.