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 @@