Answer the question
In order to leave comments, you need to log in
Angular routing with a parameter. How to update a component based on a parameter?
Good day! I have this route
const appRoutes: Routes = [
{ path: 'catalog/:sectionCode', component: RazdelComponent },
{ path: 'catalog/:sectionCode/:elementCode', component: TovarComponent },
];
<a [routerLink]="['/catalog/seraf', 'tovar2']">Товар 2</a>
Answer the question
In order to leave comments, you need to log in
Everything is in the docks: https://angular.io/guide/router#route-parameters (Milestone 3, Heroes Feature, Route Parameters)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question