I'm attempting to switch to a new page when clicking on the icon, and my component code looks like this:
getTabDetails() {
switch (this.tabContent) {
case 'Shipment content':
{
this.router.navigateByUrl('/ProjectShipment/000634');
}
}
}
Below is my Routing component configuration:
const appRoutes: Routes = [
{
path: 'dB',
data: { title: 'Dashboard' },
children: [
{
path: 'ProjectShipment/:reportProject',
component: ProjectShipmentComponent,
data: { title: 'Project Shipment' },
}
When I click the icon, I encounter the following error:
Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'ProjectShipment/000634' Error: Cannot match any routes. URL Segment: 'ProjectShipment/000634'
However, accessing the page directly through the URL works:
http://localhost:4200/dB/ProjectShipment/000634
Am I overlooking something here?