Skip to content
Angular Essentials
GitHub

Route order is important!

Router uses a first-match wins strategy when matching routes, so more specific routes should be placed above less specific routes.

List routes with a static path first, followed by an empty path route, which matches the default route.

The wildcard route comes last because it matches every URL and the Router selects it only if no other routes match first.