import { Component , EventEmitter , Output } from "@angular/core" ; import { AuthenticationService } from "../../common/http/authentication.service" ; @ Component ( { templateUrl : "./menu-header.component.html" , selector : "menu-header" , providers : [ AuthenticationService ] , styleUrls : [ './menu-header.component.css' ] } ) export class MenuHeaderComponent { isCollapsed : boolean = true ; authenticationService : AuthenticationService ; @ Output ( ) menuEmitter = new EventEmitter < string > ( ) ; toggleCollapse ( ) { this . isCollapsed = ! this . isCollapsed ; } constructor ( private _authenticationService ) { this . authenticationService = _authenticationService ; } selectMenu ( menuName ) { this . menuEmitter . emit ( menuName ) ; } }