Currently, I am working on an Angular 2 project with routing implementation.
In the app.routing.module.ts file:
{ path: '', component: CComponent },
{ path: 'Ddata:id', component: DComponent,
children: [
{
path: 'qdata:id',
component: QComponent
}
]
},
{ path: 'Adata', component: AComponent },
After clicking on a link, I am able to fetch data by passing the ID in the URL, which looks like http://localhost:4200/Ddata/1
Now, I need to modify the URL to look like http://localhost:4200/Ddata/name
If anyone could guide me on how to achieve this, I would greatly appreciate it.