import { Component , OnInit } from '@angular/core' ; import { Router } from "@angular/router" ; import { ResponsiveNavigationService } from "../../services/responsive-navigation.service" ; import { ContextService } from "../../services/context.service" ; import { AccountService } from "../../services/account.service" ; import { PopupItem } from "../../models/popup-item.model" ; @ Component ( { selector : 'app-header' , templateUrl : './header.component.html' , styleUrls : [ './header.component.scss' ] } ) export class HeaderComponent { public logoutPopup = [ new PopupItem ( 'Logout' , '' , ( ) => { this . context . purge ( ) ; this . router . navigate ( [ '/base/start/login' ] ) ; } ) ] ; public showPopup = false ; constructor ( private router , public context , private responsiveNavigationService ) { } homeLink ( ) { this . router . navigate ( [ 'base/home/my-groups-section' ] ) ; } toggleSidemenu ( ) { this . responsiveNavigationService . setSidemenu ( true ) ; } toggleLogoutPopup ( $event ) { this . showPopup = ! this . showPopup ; $event . stopPropagation ( ) ; } }