Route Parameter

noun

say it: “ROWT puh-RAM-ih-ter” /raʊt pəˈræmɪtər/

A changing part of a route's address, such as :id, that the component can read.

What is Route Parameter?

A route parameter is a changing part of a URL, like the 42 in /recipes/42. With withComponentInputBinding(), it arrives straight into a component input().

{ path: 'recipes/:id', component: RecipeDetail }

export class RecipeDetail {
  id = input.required<string>(); // filled from :id
}

In a sentence

  • “The route parameter :id carries the 7 in /products/7.”

Level: Journeyman · More Angular terms at this level

Updated

In other subjects