[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:
parent
9367777fb0
commit
0283df0b52
|
@ -38,7 +38,7 @@ export class MenuItem {
|
||||||
if (!menu.markAsActive) {
|
if (!menu.markAsActive) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (currentRoute == menu.route) {
|
if (menu.route.length > 0 && (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) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ export class PreviousRouteRecorder implements CanDeactivate<any> {
|
||||||
}
|
}
|
||||||
canDeactivate(component: any): Observable<boolean> | boolean {
|
canDeactivate(component: any): Observable<boolean> | boolean {
|
||||||
if (typeof localStorage !== 'undefined') {
|
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);
|
localStorage.setItem('previousRoute', properties.domain + properties.baseLink + this.router.url);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue