Top
There are Numerous links in sidebar and if we write whole code in html then number of lines will increase a lot. So to prevent that we have created a Service for the sidebar links so that we can loop through the array links and render our links accordingly.
You can find nav.service.ts on the following path: "src/app/shared/services/nav.service.ts"
public MENUITEMS: Menu[] = [
{
title: 'home',
icon: 'home',
type: 'sub',
active: false,
level: 1,
children: [
{
title: 'slider filter search',
path: '/theme/slider-filter-search',
type: 'link',
},
{
title: 'corporate',
path: '/theme/corporate',
type: 'link',
},
{
title: 'enterprise',
path: '/theme/enterprise',
type: 'link',
},
{
title: 'classic',
path: '/theme/classic',
type: 'link',
badge: true,
badgeText: 'New',
}
]
}
]
If you need to modify anything in the already made navbar you have to make changes
in this file src/app/shared/services/nav.service.ts.
Adding new Links
Lets say you want to add a new link in the navigation bar, then you can do that by following the below given steps.
Step 1: add a new object in the array of navlinks containing the
title, icon, type, active, level, magamenu, right and children (if any) as the keys to that object.
Make sure that you provide the proper path in the nav.service.ts file
or else page won't render as the website won't be able to find the correct page for
that path.