diff --git a/projects/common/src/fm/components/app-menu/app-menu.component.html b/projects/common/src/fm/components/app-menu/app-menu.component.html
index 5a9b54d..be37a1f 100644
--- a/projects/common/src/fm/components/app-menu/app-menu.component.html
+++ b/projects/common/src/fm/components/app-menu/app-menu.component.html
@@ -2,7 +2,7 @@
diff --git a/projects/common/src/fm/components/app-menu/app-menu.component.ts b/projects/common/src/fm/components/app-menu/app-menu.component.ts
index d9f405a..9c9a93a 100644
--- a/projects/common/src/fm/components/app-menu/app-menu.component.ts
+++ b/projects/common/src/fm/components/app-menu/app-menu.component.ts
@@ -1,6 +1,4 @@
-import { Component, OnInit, Input,AfterViewInit } from '@angular/core';
-import { ActivatedRoute } from '@angular/router';
-
+import { Component, OnInit, Input } from '@angular/core';
import { IUser } from '../../models/user';
import {Store} from '@ngrx/store';
@@ -12,28 +10,28 @@ import * as appActions from '../../actions/app-common.actions';
templateUrl: './app-menu.component.html',
styleUrls: ['./app-menu.component.scss']
})
-export class AppMenuComponent implements OnInit,AfterViewInit {
+export class AppMenuComponent implements OnInit {
@Input() user:IUser;
@Input() showMenu:boolean;
public noContent: boolean = true;
- constructor(private store: Store, private route: ActivatedRoute) { }
+ constructor(private store: Store) { }
ngOnInit(): void {
}
- ngAfterViewInit() {
- this.route.children.forEach((entry) => {
- if(entry.outlet=="app-menu") {
- this.noContent=false;
- }
- });
- }
-
toggle(event:MouseEvent) {
event.stopPropagation();
this.store.dispatch(new appActions.ToggleAppMenu());
}
+ activateRoute() {
+ this.noContent=false;
+ }
+
+ deActivateRoute() {
+ this.noContent=true;
+ }
+
}
diff --git a/projects/common/src/fm/components/help-menu/help-menu.component.html b/projects/common/src/fm/components/help-menu/help-menu.component.html
index e6f42ad..5cd1a1f 100644
--- a/projects/common/src/fm/components/help-menu/help-menu.component.html
+++ b/projects/common/src/fm/components/help-menu/help-menu.component.html
@@ -2,7 +2,7 @@
\ No newline at end of file
diff --git a/projects/common/src/fm/components/help-menu/help-menu.component.ts b/projects/common/src/fm/components/help-menu/help-menu.component.ts
index ad2995e..aababd0 100644
--- a/projects/common/src/fm/components/help-menu/help-menu.component.ts
+++ b/projects/common/src/fm/components/help-menu/help-menu.component.ts
@@ -1,6 +1,5 @@
import { Input } from '@angular/core';
-import { Component, OnInit,AfterViewInit } from '@angular/core';
-import { ActivatedRoute } from '@angular/router';
+import { Component, OnInit } from '@angular/core';
import { IUser } from '../../models/user';
import {Store} from '@ngrx/store';
@@ -12,27 +11,27 @@ import * as appActions from '../../actions/app-common.actions';
templateUrl: './help-menu.component.html',
styleUrls: ['./help-menu.component.scss']
})
-export class HelpMenuComponent implements OnInit, AfterViewInit {
+export class HelpMenuComponent implements OnInit {
@Input() user:IUser;
@Input() showMenu:boolean;
public noContent: boolean = true;
- constructor(private store: Store, private route: ActivatedRoute) { }
+ constructor(private store: Store) { }
ngOnInit(): void {
}
- ngAfterViewInit() {
- this.route.children.forEach((entry) => {
- if(entry.outlet=="help-menu") {
- this.noContent=false;
- }
- });
- }
-
toggle(event:MouseEvent) {
event.stopPropagation();
this.store.dispatch(new appActions.ToggleHelpMenu());
}
+
+ activateRoute() {
+ this.noContent=false;
+ }
+
+ deActivateRoute() {
+ this.noContent=true;
+ }
}
diff --git a/projects/common/src/fm/components/notification-menu/notification-menu.component.html b/projects/common/src/fm/components/notification-menu/notification-menu.component.html
index 5d25964..6b3b526 100644
--- a/projects/common/src/fm/components/notification-menu/notification-menu.component.html
+++ b/projects/common/src/fm/components/notification-menu/notification-menu.component.html
@@ -3,7 +3,7 @@
{{unread}}
diff --git a/projects/common/src/fm/components/notification-menu/notification-menu.component.ts b/projects/common/src/fm/components/notification-menu/notification-menu.component.ts
index 349e214..aa9a518 100644
--- a/projects/common/src/fm/components/notification-menu/notification-menu.component.ts
+++ b/projects/common/src/fm/components/notification-menu/notification-menu.component.ts
@@ -1,5 +1,4 @@
-import { Component, OnInit, Input,AfterViewInit } from '@angular/core';
-import { ActivatedRoute } from '@angular/router';
+import { Component, OnInit, Input } from '@angular/core';
import { IUser } from '../../models/user';
import {Store} from '@ngrx/store';
@@ -11,29 +10,29 @@ import * as appActions from '../../actions/app-common.actions';
templateUrl: './notification-menu.component.html',
styleUrls: ['./notification-menu.component.scss']
})
-export class NotificationMenuComponent implements OnInit,AfterViewInit {
+export class NotificationMenuComponent implements OnInit {
@Input() unread:number;
@Input() user:IUser;
@Input() showMenu:boolean;
public noContent: boolean = true;
- constructor(private store: Store, private route: ActivatedRoute) { }
+ constructor(private store: Store) { }
ngOnInit(): void {
}
- ngAfterViewInit() {
- this.route.children.forEach((entry) => {
- if(entry.outlet=="notification-menu") {
- this.noContent=false;
- }
- });
- }
-
toggle(event:MouseEvent) {
event.stopPropagation();
this.store.dispatch(new appActions.ToggleNotificationMenu());
}
+ activateRoute() {
+ this.noContent=false;
+ }
+
+ deActivateRoute() {
+ this.noContent=true;
+ }
+
}