From e21e8686fce1a05f77b135d2e0bd95c96faac096 Mon Sep 17 00:00:00 2001 From: masumulu28 Date: Sun, 26 Mar 2023 20:41:16 +0300 Subject: [PATCH] Document updated --- docs/en/UI/Angular/Modifying-the-Menu.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/en/UI/Angular/Modifying-the-Menu.md b/docs/en/UI/Angular/Modifying-the-Menu.md index c0ab458549..2aec9f37e4 100644 --- a/docs/en/UI/Angular/Modifying-the-Menu.md +++ b/docs/en/UI/Angular/Modifying-the-Menu.md @@ -89,13 +89,11 @@ function configureRoutes(routes: RoutesService) { ``` Also we can define group for navigation elements. It's an optional property - - **Note:** It'll also include groups that included from modules + - **Note:** It'll also include groups that defined at modules ```js // route.provider.ts -import { ABP } from '@abp/ng.core'; - -type GroupType = ABP.Group; +import { RoutesService } from '@abp/ng.core'; function configureRoutes(routes: RoutesService) { return () => { @@ -116,16 +114,18 @@ function configureRoutes(routes: RoutesService) { } ``` -To get route items as grouped we can use `groupedVisible` getter method - - It will return `RouteGroup[]` if there is any group in route tree otherwise it'll return undefined +To get route items as grouped we can use `groupedVisible` (or Observable one `groupedVisible$`) getter methods + - It will return `RouteGroup[]` if there is any group in route tree otherwise it'll return `undefined` ```js -import { ABP, RoutesService } from "@abp/ng.core"; +import { ABP, RoutesService, RouteGroup } from "@abp/ng.core"; import { Component } from "@angular/core"; @Component(/* component metadata */) export class AppComponent { - visible: ABP.RouteGroup[] | undefined = routes.groupedVisible; + visible: RouteGroup[] | undefined = this.routes.groupedVisible; + //Or + visible$:Observable[] | undefined> = this.routes.groupedVisible$; constructor(routes: RoutesService) {} }