Reputation: 57
Did somebody try to use wakandaServer (wakanda-client for angular) to build a hybrid app with the nativescript framework...The goal is to got wakanda as backend server in one hybrid application. I make some test with these features....in the nativescript Sidekick and I still receive this error message : ReferenceError: window is not defined I see effectively 14 occurences of the window object in wakanda-client/dist/wakanda-client.no-promise.js. NativeScript explain well that window object is undefined in nativeScript... Some links to discover on this feature ?
Upvotes: 0
Views: 37
Reputation: 21908
Mobile applications you build with {N} may not be called Hybird, at least it's not Corodova / PhoneGap where your UI is totally built of HTML DOM runs within a WebView (more like a browser app).
With {N} you still reuse your web development skills such as HTML (XML) / CSS / JavaScript but the application UI is completely native, it doesn't run inside a WebView. It has a JavaScript runtime which allows you to use any standard JavaScript code (browser independent) and gives you 100% access to any device apis.
window
is an object that will be available only when running inside a browser (browser dependent). I'm not sure why wakanda-client uses window object, may be to store global reference and if that's the case you could by pass the error by adding the below line before you import wakanda-client libraries in your code.
global.window = {};
Upvotes: 0