import {Component} from "@angular/core"; import {LayoutService} from "./layout.service"; @Component({ selector: '[sidebar-content]', template: `
` }) export class SidebarContentComponent { constructor(private layoutService: LayoutService) { } onMouseEnter() { this.layoutService.setHover(true); } onMouseLeave() { this.layoutService.setHover(false); } public toggleOpen() { this.layoutService.setOpen(!this.layoutService.open); } }