Hello,
I'm currently testing nw.js 12.0 and I have difficulties to compile my script.js file containing my angular front-end application.
The content of my script.js file :
var app = angular.module('appName', []);
app.controller(...);
app.directive(...);
app.factory(...);
[...]
So i compiled it like this : nwjc.exe script.js data.bin
No errors appeared.
But when I launch the application, i have an error in my console :
TypeError: Cannot read property 'localStorage' of undefined
This localStorage property comes from the first declared variable in my interceptorService :
var jwt = $window.localStorage.getItem('jwt');
(so maybe the first $window used in the application at start...)
I know when we use nwsnapshot we can't compile code with undefined variables inside the file, but is it the same for nwjc ? (my only undefined variable would be 'angular').
Thank you.