diff --git a/articles/013-create-new-page/index.html b/articles/013-create-new-page/index.html index f1638588..3d71b3a9 100644 --- a/articles/013-create-new-page/index.html +++ b/articles/013-create-new-page/index.html @@ -99,6 +99,7 @@ If it does not fit your needs please create a GitHub issue and tell us why. We w NewComponent ] }) +export default class NewModule {}
5) The penultimate thing we need to do is to declare a route in src/app/pages/pages.menu.ts.
@@ -113,6 +114,7 @@ Typically all pages are children of the /pages route and defined un
menu: {
title: 'New Page', // menu title
icon: 'ion-android-home', // menu icon
+ pathMatch: 'prefix', // use it if item children not displayed in menu
selected: false,
expanded: false,
order: 0
@@ -135,7 +137,10 @@ Typically all pages are children of the /pages route and defined un
}
]
-
If you’d like to highlight menu item when current URL path partially match the menu item
+path - use pathMatch: ‘prefix’. In this case if the menu item has no children in the menu and
+you navigated to some child route - the item will be highlighted.
+
6) And in the end let’s import our component in src/app/pages/pages.routing.ts like this:
const routes: Routes = [
{