A route parameter lets one Angular route accept different values in a URL segment. Write a colon followed by a name in the route path: `form/:mode` accepts both `form/create` and `form/edit`, assigning the second segment to `mode`. This can replace separate routes that target the same component. section 24.3.2
Use a URL value to select form behavior
Configure `{ path: "form/:mode", component: FormComponent }`. In the component, `activeRoute.snapshot.params["mode"] == "edit"` sets an editing flag. The component reads the value by name rather than parsing the URL itself. section 24.3.2
A parameter matches any value in its segment; it does not make the segment optional. Thus `form/london` matches `form/:mode`, but `form` has too few segments and `form/edit/1` has too many. A fixed segment must still match exactly. section 24.3.2
Route values can also populate component input properties when `bindToComponentInputs: true` is set in the router configuration. Read those inputs in `ngOnInit`, after route data has populated them. For an edit URL such as `form/edit/2`, add `:id`, generate the link with `[routerLink]="['/form', 'edit', item.id]"`, and convert the received ID string before looking up the product. section 24.3.2
The same pattern appears in child routes for an administration area, where parameters such as `:mode` and `:id` provide details that a selected component can use to change its behavior. section 7.5.2





