angular-electron icon indicating copy to clipboard operation
angular-electron copied to clipboard

Include module without electron cause error

Open gimox opened this issue 9 years ago • 3 comments

Including the module without Electron cause error. Can be useful including it in a "progressive web app" where some build haven't electron code. Example web, android, ios, desktop with electron.

It can be solved creating a empty object electronRequire

gimox avatar Jan 23 '17 11:01 gimox

Your MR worked for me. Thanks @gimox

patrickrb avatar Jan 24 '17 17:01 patrickrb

👍

gimox avatar Jan 24 '17 17:01 gimox

Remember to check if ipcRenderer has electron object doing something like:

// es6 syntax

if (angular.isFunction(this.ipcRenderer.on)) {
      this.ipcRenderer.on('hoto:home', (event, arg) => {
            this.$state.go('main.home');
      });

 ...
}

gimox avatar Jan 25 '17 11:01 gimox