Hello,
I try to combine Ionic3 with Electron to develop an “universal” application.
I followed this tutorial and try to make a provider to access electrons apis but I have an error at launch :
Concerning electron integration, I added :
src/app/app.module.ts
import { ElectronProvider } from '../providers/electron/electron';
@NgModule({
providers: [
ElectronProvider
]
})
src/providers/electron/electron.js
import { Injectable } from '@angular/core';
import * as electron from 'electron';
/*
Generated class for the ElectronProvider provider.
See https://angular.io/guide/dependency-injection for more info on providers
and Angular DI.
*/
@Injectable()
export class ElectronProvider {
currentZoom: number = 0;
constructor() {
}
/* For testing...*/
zoomIn(){
electron.webFrame.setZoomLevel(++this.currentZoom);
}
zoomOut(){
electron.webFrame.setZoomLevel(--this.currentZoom);
}
}
Where am I wrong?
Thanks in advance