angular/angular.js — pull request #3500 by notNotDaniel (2013-08-07 23:07:40+00:00)
Title: refactor(ngRoute): make the order of route matching deterministic

Previously, routes were matched against the current $location in an arbitrary
order. This change ensures that routes are matched in the order they were
originally configured, making it possible to specify overlapping path
components which are fixed in some routes and variable in others. For example,

$route.when('/Book/new', ...);
$route.when('/Book/:bookId', ...);

can now be used to ensure that a different route configuration is used for
new books and for existing ones.