are u talking about this?
logical-model-route-provider.ts
import { RoutesService, eLayoutType } from '@abp/ng.core';
import { APP_INITIALIZER } from '@angular/core';
export const LOGICAL_MODELS_ROUTE_PROVIDER = [
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },
];
function configureRoutes(routes: RoutesService): any {
return () => {
routes.add([
{
path: '/logical-models',
name: '::Menu:LogicalModels',
layout: eLayoutType.application,
requiredPolicy: 'Models.Logical',
parentName: '::Menu:Models',
},
]);
};
}
app.component.ts
constructor(
private idleService: IdleService,
private settingTabs: SettingTabsService,
private userMenuService: UserMenuService,
private config: ConfigStateService,
private navItems: NavItemsService,
private ngSelectConfig: NgSelectConfig,
private replaceableComponents: ReplaceableComponentsService,
private routes: RoutesService,
private modal: NgbModal,
private oAuthService: OAuthService,
private stickyFilterService: StickyFilterService,
private dynamicIdService: DynamicIdService,
) {
this.replaceableComponents.add({
component: FooterComponent,
key: eThemeLeptonXComponents.Footer,
});
this.replaceableComponents.add({
component: BreadcrumbComponent,
key: eThemeLeptonXComponents.Breadcrumb,
});
this.routes.patch('::Menu:LogicalModels', {
path: '/logical-models/:lModelId/logical-tables',
});
this.ngSelectConfig.appendTo = 'body';
}
logical-models-routing.module.ts
const routes: Routes = [
{
path: '',
component: LogicalModelsComponent,
canActivate: [authGuard, permissionGuard],
children: [
{
path: ':lModelId/logical-tables',
component: LogicalTablesComponent,
canActivate: [authGuard, permissionGuard],
},
],
},
logical-models.component.ts
navTables(record: LogicalModelDto): void {
this.router.navigate(['logical-models', record.id, 'logical-tables']);
}
Having some issues w/ your solution, it is not working for me.
tried patch and i tried add. i did not see anything in the left nav when i did the patch. when i did the add i saw the new left nav item. also tried when using the angular child route and not child route
both patch and add, the left nav does not remain selected
in your solution will there be a item in the left nav?
i am closing the ticket as we have figured out an alternate way to get the data. I do thank you for the effort!!!
berkansasmaz,
i did find an email for you looking through the support tickets: berkan.sasmaz@volosoft.com. i will send the email there.
I needed to modify the code a little, still testing.
I had issues with using renderer in a service. I found a work around.
Also had issues with some items under administration, think i found a work around for this also.
i will need to do more testing but the code was a great base to start with !!!
our testing looking good, closing this ticket.
ok, on monday i will generate a new abp project with the latest cli, verify that i do not see the warnings. if that goes well i will upgrade the front end code to what ever the out of the box front end versions are and let you know how it goes.
Latest version means abp 9? if yes we will not be moving to dotnet 9 because it is not lts and .net 8 is. if we can move to abp 9 and still stay .net 8, that might be a solution for us