Hi,
You can try something like this:
- 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.
- Import the generated routes
import {routes} from './app.routes';
and the componentimport {ReportComponent} from './report/report-component';
- 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
}
]
}
];
- Import
import { RouterModule } from '@angular/router';
and add the custom routes to theimports
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 {
}