diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.html b/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.html
index 6437233cb1..4d22ddc8d2 100644
--- a/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.html
+++ b/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.html
@@ -1,6 +1,6 @@
@@ -8,7 +8,7 @@
-
-
{{ route.name | abpLocalization }}
@@ -44,27 +44,23 @@
(click)="$event.preventDefault(); $event.stopPropagation()"
[class.d-block]="smallScreen && navbarRootDropdown.expand"
>
-
+
-
-
+
+
+
+
diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.ts b/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.ts
index 2ed204e0b0..8b73c8ee29 100644
--- a/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.ts
+++ b/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.ts
@@ -1,37 +1,14 @@
-import { ABP, ConfigState } from '@abp/ng.core';
-import { Component, Input, Renderer2, TrackByFunction } from '@angular/core';
-import { Select } from '@ngxs/store';
-import { Observable } from 'rxjs';
-import { map } from 'rxjs/operators';
+import { ABP, RoutesService, TreeNode } from '@abp/ng.core';
+import { Component, Input, TrackByFunction } from '@angular/core';
@Component({
selector: 'abp-routes',
templateUrl: 'routes.component.html',
})
export class RoutesComponent {
- @Select(ConfigState.getOne('routes'))
- routes$: Observable;
+ @Input() smallScreen: boolean;
- @Input()
- smallScreen: boolean;
+ trackByFn: TrackByFunction> = (_, item) => item.name;
- get visibleRoutes$(): Observable {
- return this.routes$.pipe(map(routes => getVisibleRoutes(routes)));
- }
-
- trackByFn: TrackByFunction = (_, item) => item.name;
-
- constructor(private renderer: Renderer2) {}
-}
-
-function getVisibleRoutes(routes: ABP.FullRoute[]) {
- return routes.reduce((acc, val) => {
- if (val.invisible) return acc;
-
- if (val.children && val.children.length) {
- val.children = getVisibleRoutes(val.children);
- }
-
- return [...acc, val];
- }, []);
+ constructor(public readonly routes: RoutesService) {}
}