App.route.ts customization

Hi,

You can try something like this:

  1. Open the app.module.ts - Radzen generates it only once and you can customise it. The app.routes.ts file is generated every time and will overwrite any changes.
  2. Import the generated routes import {routes} from './app.routes'; and the component import {ReportComponent} from './report/report-component';
  3. Create the new route:
const customRoutes = [
  routes[0],
  {
    path: routes[1].path,
    component: routes[1].component,
    children: [
      ...routes[1].children,
      {
         path: 'report/:relName',
         component: ReportComponent
      }
    ]
  }
];
  1. Import import { RouterModule } from '@angular/router'; and add the custom routes to the imports section of ApplicationModule:
@NgModule({
  declarations: [
    ...AppDeclarations
  ],
  imports: [
    environment.production ? ServiceWorkerModule.register('ngsw-worker.js') : [],
    AppImports,
    RouterModule.forRoot(customModules)
  ],
  providers: [
    ...AppProviders
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
}