# Route Parameters — Angular Fundamentals: Components, Signals and Routing

Source: https://www.skillbyai.com/en/angular/ng-route-params

> Read dynamic URL segments such as an item id with route parameters and ActivatedRoute.

## A parameterized route

A colon marks a dynamic segment: `:id` matches any value at that position in the URL.

```typescript
export const routes: Routes = [
  { path: 'products/:id', component: ProductDetailComponent },
];
```

## Reading the param

`ActivatedRoute` exposes the current route's parameters, either as a snapshot or an observable.

```typescript
export class ProductDetailComponent {
  private route = inject(ActivatedRoute);
  productId = this.route.snapshot.paramMap.get('id');
}
```
