Facing below error for running the app-dbdetails page
Error: Uncaught (in promise): Error: NG04002: Cannot match any routes. URL Segment: 'app-dbdetails'
Error: NG04002: Cannot match any routes. URL Segment: 'app-dbdetails'
at ApplyRedirects.noMatchError (router.mjs:3644:16)
at router.mjs:3626:28
at catchError.js:10:39
at OperatorSubscriber._error (OperatorSubscriber.js:23:21)
at OperatorSubscriber.error (Subscriber.js:40:18)
at OperatorSubscriber._error (Subscriber.js:64:30)
at OperatorSubscriber.error (Subscriber.js:40:18)
at OperatorSubscriber._error (Subscriber.js:64:30)
at OperatorSubscriber.error (Subscriber.js:40:18)
at OperatorSubscriber._error (Subscriber.js:64:30)
at resolvePromise (zone.js:1211:31)
at resolvePromise (zone.js:1165:17)
at zone.js:1278:17
at _ZoneDelegate.invokeTask (zone.js:406:31)
at Object.onInvokeTask (core.mjs:26261:33)
at _ZoneDelegate.invokeTask (zone.js:405:60)
at Zone.runTask (zone.js:178:47)
at drainMicroTaskQueue (zone.js:585:35)
at ZoneTask.invokeTask [as invoke] (zone.js:491:21)
at invokeTask (zone.js:1661:18)
Here are the file details that you may need to fix this error:
action.component.ts
DbDetails: {
svgPath: this.svgPaths.dbDetails,
svgPathSelected: this.baseResourcePath + "/dbdetails-blue.svg",
selected: false,
otherPageTitle: "/ DB Details",
route: "app-dbdetails"
},
case 'app-dbdetails':
this.dataRefreshService.isDBDetailsChanged.next("DBDetails");
break;
historian-viewer-routing.module.ts
const routes: Routes = [
{ path: 'app-dbdetails', component: DBDetailsComponent },
];
dbdetails.component.ts
@Component({
selector: 'app-dbdetails',
templateUrl: './dbdetails.component.html',
styleUrls: ['./dbdetails.component.scss']
})
app-routing.module.ts
import { NgModule } from "@angular/core";
import { Route, RouterModule } from "@angular/router";
export const appRoutes: Route[] = [
{
path: "mfe-historian",
loadChildren: () => import("./historian-viewer/historian-viewer.module").then((m) => m.RemoteHistorianViewerModule),
data: {
name: "Historian"
}
},
];
@NgModule({
imports: [RouterModule.forRoot(appRoutes, { useHash: true })],
exports: [RouterModule]
})
export class AppRoutingModule {}
File location in Git: D:softmfe-historiansrcapphistorian-viewerdbdetails
historian.viewer.module.ts
import { NgModule } from '@angular/core';
import { CommonModule, DatePipe } from '@angular/common';
import { HistorianViewerRoutingModule } from './historian-viewer-routing.module';
import { HistorianViewerComponent } from './historian-viewer.component';
import { SharedModule } from 'src/app/shared/shared.module';
import { ActionsComponent } from '../components/actions/actions.component';
// import { CustomtoasterComponent } from '../components/customtoaster/customtoaster.component';
import { TabsModuleLNT } from '../components/tabs/tabs.module';
import { ButtonModule } from '../components/button/button.module';
import { DrpdownModule } from '../components/drpdown/drpdown.module';
import { NumberModule } from '../components/number/number.module';
import { ActionsRendererComponent } from '../components/actionsrenderer/actionsrenderer.component';
import { AgGridModule } from 'ag-grid-angular';
import { FileLocationComponent } from './file-location/file-location.component';
import { FileArtifactComponent } from './file-artifact/file-artifact.component';
import { DBArtifactComponent } from './dbartifact/dbartifact.component';
import { DBDetailsComponent } from './dbdetails/dbdetails.component';
import { DashboardComponent } from './dashboard/dashboard.component';
@NgModule({
declarations: [
HistorianViewerComponent,
ActionsComponent,
FileLocationComponent,
DashboardComponent,
FileArtifactComponent,
DBArtifactComponent,
DBDetailsComponent,
ActionsRendererComponent
],
imports: [
CommonModule,
HistorianViewerRoutingModule,
TabsModuleLNT,
ButtonModule,
NumberModule,
DrpdownModule,
SharedModule,
AgGridModule.withComponents([ActionsRendererComponent])
],
entryComponents: [ActionsRendererComponent],
providers: [DatePipe]
})
export class RemoteHistorianViewerModule {}
New contributor
Ankit Mahule is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.