js2excel icon indicating copy to clipboard operation
js2excel copied to clipboard

Global is Not defined Angular 7

Open Bmastaz opened this issue 7 years ago • 2 comments

After adding in the fix #9 compiling in angular 7 is fine but then I run into this error. Please test if this is compatible with Angular 7

js2excel.min.js:1 Uncaught ReferenceError: global is not defined at js2excel.min.js:1 at push../node_modules/js2excel/dist/js2excel.min.js.Zd (js2excel.min.js:1) at Object../node_modules/js2excel/dist/js2excel.min.js (js2excel.min.js:1) at webpack_require (bootstrap:78) at Module../src/app/download/download.component.ts (main.js:264) at webpack_require (bootstrap:78) at Module../src/app/app-routing.module.ts (main.js:74) at webpack_require (bootstrap:78) at Module../src/app/app.module.ts (app.component.ts:12) at webpack_require (bootstrap:78)

Bmastaz avatar Dec 14 '18 17:12 Bmastaz

Also running into this, unfortunately :(

emilionavarro avatar Jun 28 '19 17:06 emilionavarro

Hello @emilionavarro @Bmastaz add this to your polyfill.ts file in your angular project


(window as any).global = window;

oneEyedSunday avatar Jul 26 '19 08:07 oneEyedSunday