[Library|Trunk]

-add check about active menu



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59788 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-11-05 16:47:23 +00:00
parent 9367777fb0
commit 0283df0b52
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -12,7 +12,7 @@ export class PreviousRouteRecorder implements CanDeactivate<any> {
}
canDeactivate(component: any): Observable<boolean> | boolean {
if (typeof localStorage !== 'undefined') {
console.log("In PreviousRouteRecorder : " + properties.domain +properties.baseLink + this.router.url );
// console.log("In PreviousRouteRecorder : " + properties.domain +properties.baseLink + this.router.url );
localStorage.setItem('previousRoute', properties.domain + properties.baseLink + this.router.url);
}
return true;