[Library|Trunk]

menu.ts - isTheActiveMenu (): check if route or part of the route is the active




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59288 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-08-17 11:03:39 +00:00
parent 6b19edafca
commit d471f09a3b
1 changed files with 2 additions and 2 deletions

View File

@ -34,11 +34,11 @@ export class MenuItem {
if (!menu.markAsActive) { if (!menu.markAsActive) {
return false; return false;
} }
if (currentRoute == menu.route) { if (currentRoute == menu.route || currentRoute.indexOf(menu.route) != -1) {
return true; return true;
} else if (menu.items.length > 0) { } else if (menu.items.length > 0) {
for (let menuItem of menu.items) { for (let menuItem of menu.items) {
if (menuItem.route == currentRoute) { if (menuItem.route == currentRoute || currentRoute.indexOf(menuItem.route) != -1) {
return true; return true;
} }
} }