Sengi-Windows-MacOS-Linux/src/app/services/electron.service.ts

21 lines
388 B
TypeScript
Raw Normal View History

2023-08-05 08:07:34 +02:00
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class MyElectronService {
constructor() {
}
setLang(lang: string) {
try {
2023-08-05 08:48:24 +02:00
if ((<any>window).api) {
2023-08-06 00:03:22 +02:00
(<any>window).api.send("changeSpellchecker", lang);
2023-08-05 08:48:24 +02:00
}
2023-08-05 08:07:34 +02:00
}
catch (err) {
console.error(err);
}
}
}