Posts by Harald Schneider

Show threads by Harald Schneider
93 posts found, page 2 of 7

Harald Schneider (In thread: JavaScript function return value in AB Script?)

Hi David

I found an example how to use an AB Script function return code in JS here in the forum. What about the other way around?

Is it possible to use the return value of a JS Custom Function in an AB Script?


Harald Schneider (In thread: Variable expansion in HTML control)
Thanks for the hint. I tried with the square brackets before, but the problem was, that the var was empty. I tapped into my own pit .. :-/

Harald Schneider (In thread: Variable expansion in HTML control)
Thanks! :-)

Harald Schneider (In thread: Variable expansion in HTML control)

Can I display a variable's content inside a HTML control? E.g.


Harald Schneider (In thread: Can we have Electron builder for Mac ?)
Sorry, I missed the latest release. You code faster, than I can write posts here :-) THANK YOU!

Harald Schneider (In thread: Can we have Electron builder for Mac ?)

Really, really awesome job with the new Electron platform :-)

Can we have this for the Mac, too ? It just requires AB to generate the proper build scripts. I have tested it and it works out of the box!

Here an example of the release script. There is just one special thing: The permissions of the app-builder need to be executable - see 1st line.


Harald Schneider (In thread: PWA Service Workers on Angular level?)

Not in my case. I keep data on the Mac's side. Here I use a small script which fixes permissions and does the build and copy job.

If I would be a pure Windows user, I would prefer one of the other options. That's what I like on AB - it allows flexible solutions for most problems :-)


Harald Schneider (In thread: PWA Service Workers on Angular level?)
Absolutely :-)

Harald Schneider (In thread: PWA Service Workers on Angular level?)
It is OK for me. It is just 1 line more in the build script, which copies the file to the www folder. Thanks for your support!

Harald Schneider (In thread: PWA Service Workers on Angular level?)
I also tried that without success.

Harald Schneider (In thread: PWA Service Workers on Angular level?)

Hi David

The only thing that works, is moving service-worker-global.js via AB Filemanager to app/scripts

Caching breaks, when there are double dots in the offlineFundamentals paths. Furthermore, if we would link service-worker.js vial Filemanager, it would be executed twice: By the generated link in index.html and when the script is registered by the global script:

So at least service-worker.js has to reside in the www folder.


Harald Schneider (In thread: PWA Service Workers on Angular level?)
If you put them into www/app, the the the cached URLs are not correctly assembled. Putting them into www just saved me the time to modify the original script ;-)

Harald Schneider (In thread: PWA Service Workers on Angular level?)
The scripts have to reside in the www folder to work properly. When I add them via filemanager, they are copied to www/app/...

Harald Schneider (In thread: PWA Service Workers on Angular level?)

I digged further into it an successfully implemented the following scripts:

https://css-tricks.com/serviceworker-for-offline/

After this, the app runs fluently, even with a cut network connection. Here is the complete procedure:

Add this to AppOptions/HTML/CustomMetaData:

Copy service-worker-global.js to the www folder:

Copy service-worker.js also to the www folder

Edit the offlineFundamentals array in service-worker.js. It should contain all your views and all image resources. All other dependencies are cached automatically then:

If everything is OK, you can track the service worker's cache management in the console of e.g. Firefox Dev Edition:


Harald Schneider (In thread: PWA Service Workers on Angular level?)

Hi,

I am still experimenting with PWAs under iOS. Unfortunately, the App does not cache image resources, once the network connection is lost.

I tried to install the Corodva Service Workers plugin, but it throws an error during built - looks like it is outdated and not really usable anymore.

Would it be possible to implement Service Worker's Caching on Angular level?

https://angular.io/guide/service-worker-intro

Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.