I am looking to update a URL path within a website from
http://localhost:4200/viewbrand/1
to http://localhost:4200/viewbrand/1/soap
, where "soap" is added after the ID in the path.
The current code in the routing module.ts file is as follows:
{ path: 'viewbrand/:id', component: LocalbrandsComponent },
Here is the existing code in the HTML file:
<a class="tile-link" href="/viewbrand/{{brand.id}}"></a>
I attempted to make changes to both the module.ts and HTML files as shown below. However, it seems that the modification does not yield the desired outcome.
{ path: 'viewbrand/:id'/:brand.name, component: LocalbrandsComponent }
<a class="tile-link" href="/viewbrand/{{brand.id}}/{{brand.name}}"></a>
Despite my efforts, the functionality does not work as expected. Is there a logical error in my approach?