Refactor ElectronService.runningInElectron
ThorstenHans opened this issue · 0 comments
ThorstenHans commented
Had selected a bad naming for this one. It's also not that intuitive to have it only as static property on ElectronService
.
Refactor it to
ElectronService.isElectronApp
and add an additional instance property.
Developers should be able to access it also on an existing instance of ElectronService
, that may be a bit more self-explaining.
@Component({})
export class MyComp implements OnInit {
constructor(private _electronService: ElectronService) { }
public ngOnInit(): void {
if(this._electronService.isElectronApp) {
// whatever
}
}
}