Query Parameters in Angular
Query Parameters in Angular: Query Parameters in Angular: an overview, Reading Query Parameters.
Updated
- Query Parameters in Angular: an overview (Journeyman): Values that are optional, such as a filter, a search or a page number, go in the query string: /products?categoryId=2&page=3. They need no route of their own, and the page shows with or without them. A route parameter says which item; a query parameter says how to show the page.
- Reading Query Parameters (Journeyman): Input binding hands query parameters to the page as inputs too, or undefined when they're missing, so give each a default with ?? in a computed. Link with routerLink and [queryParams], and change them from code with navigate and queryParamsHandling 'merge'.