import { Component, OnInit } from '@angular/core'; import { ipcRenderer, remote } from 'electron'; @Component({ selector: 'app-window-controls', templateUrl: './window-controls.component.html', }) export class WindowControlsComponent implements OnInit { windowState: string; constructor( ) { } ngOnInit() { } onMinimize(event) { remote.getCurrentWindow().minimize(); } onRestore(event) { remote.getCurrentWindow().unmaximize(); } onMaximize(event) { remote.getCurrentWindow().maximize(); } onClose(event) { remote.getCurrentWindow().close(); } }