NG.V · Angular 22 practice question
How does Angular's router evaluate a static URL path such as `/admin`?
export const routes: Routes = [
{ path: 'admin', component: AdminComponent },
];
Check answer and explanation
Correct answer: It matches the `path` string exactly and produces a fixed outcome.
Explanation
Static URL paths match the configured `path` string exactly and always lead to a fixed routing outcome.
Common trap
The router does not perform single-letter prefix matching. Static segments do not extract dynamic parameters.
Source: Angular docs: Define routes — Static URL Paths
Checked against the cited text on 2026-11-27.