From 6963aa73b3c762df40d16226ba92b4837d0c0075 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Mon, 29 Jun 2020 22:12:54 +0300 Subject: [PATCH] docs: fix patch/remove route example --- docs/en/UI/Angular/Modifying-the-Menu.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/docs/en/UI/Angular/Modifying-the-Menu.md b/docs/en/UI/Angular/Modifying-the-Menu.md index 95370b49bf..76298e1674 100644 --- a/docs/en/UI/Angular/Modifying-the-Menu.md +++ b/docs/en/UI/Angular/Modifying-the-Menu.md @@ -183,15 +183,13 @@ The `patch` method of `RoutesService` finds a route by its name and replaces its // this.routes is instance of RoutesService // eThemeSharedRouteNames enum can be imported from @abp/ng.theme.shared -this.routes.add([ - { - path: '/dashboard', - name: '::Menu:Dashboard', - parentName: '::Menu:Home', - order: 1, - layout: eLayoutType.application, - }, -]) +const dashboardRouteConfig: ABP.Route = { + path: '/dashboard', + name: '::Menu:Dashboard', + parentName: '::Menu:Home', + order: 1, + layout: eLayoutType.application, +}; const newHomeRouteConfig: Partial = { iconClass: 'fas fa-home', @@ -199,10 +197,9 @@ const newHomeRouteConfig: Partial = { order: 0, }; -const new DashboardRouteConfig: - +this.routes.add([dashboardRouteConfig]); this.routes.patch('::Menu:Home', newHomeRouteConfig); -this.routes.remove('Your navigation', newHomeRouteConfig); +this.routes.remove(['Your navigation']); ``` - Moved the _Home_ navigation under the _Administration_ dropdown based on given `parentName`.