Questions tagged [ngsw-config]

16 questions
14
votes
0 answers

Angular PWA in microfrontends

I have several microfrontends setup using an "app-shell" sort of app for the domain root and each microfrontend on the first path element. Each app is built like a standalone angular application using shared libraries to reuse common components and…
Øystein Amundsen
  • 3,993
  • 8
  • 44
  • 63
3
votes
1 answer

Angular application in custom url path, with ServiceWorker

I am developing a Angular 10 application. It uses the Angular "service worker" to create a PWA. The compiled application is in "c:\-website-folder-\ng-app\dist". Then the user can access to App with a URL like this:…
riofly
  • 1,694
  • 3
  • 19
  • 40
2
votes
0 answers

Angular Service Worker Request Files from Wrong URL

I have an Angular 10 .NET application hosted at https://myapp-fnl/# The application has cache-busting implemented via an ngsw-worker that I discovered does not work properly. The service-worker is registered, and I can see my cached files, but when…
2
votes
1 answer

Angular Service Worker (ngsw) or Workbox

Please let me ask a question. Firstly,I would like to build angular progressive web app. And I found that I can use angular native service worker (ngsw) or also framework-agnostic library called Workbox to build progressive web app. Which approach…
2
votes
1 answer

Angular Service Worker : Refresh of application being deployed throws a 504 error

I build my angular 8 project using ng build --prod Serve it from /dist folder using http-server ( and eventually stop it and the app still works served via the service worker) the project registers its service worker I am able to navigate…
2
votes
0 answers

Angular PWA exclude manifest from service worker cache

I would like to exclude the manifest file from service worker cache, because it is created dynamically by a web function.
Dennis
  • 61
  • 1
  • 2
1
vote
0 answers

Angular PWA load old asset when reopen browser

I have an web app using angular 13 and ngsw with caching features. The problem is when I deployed a new version to production, then I refresh the page, it's updating to a latest version, but when I close the browser than reopen it, it's loading from…
1
vote
0 answers

ngsw - angular service worker 504 error for document in Offline mode

Am using a angular application where i planned to use the angular /pwa ( ngsw ) for integration and when am loading service worker porperly registerd and i can see items in CacheStorage. But when am going offline am getting an error. I now this is…
1
vote
1 answer

In Angular PWA How to Cache the API request( with paramter ) dynamically instead of manually adding each and every url in ngsw-config.json

I have some API like https://api-******y?apikey=sX4&q=london, Where q=london is a parameter that will keep changing, So how can i add this URL in the list of urls in ngsw-config.json file "dataGroups": [ { "name": "api-performance", …
ASR
  • 311
  • 2
  • 14
1
vote
1 answer

angular app with service-worker (pwa) is not working as expected

Working on an offline angular with service workers get the reference from https://angular.io/guide/service-worker-config Application working fine offline the only issue is with cache update mechanism if i use "installMode": "prefetch" application…
0
votes
0 answers

Prevent Using Timeout and Interval with swupdate - Angular

I utilized the guidelines presented in this article to implement Progressive Web App (PWA) features within my Angular application. The primary objective was to establish the capability to detect the availability of new application versions. This…
Ahsan Hussain
  • 952
  • 4
  • 21
  • 42
0
votes
0 answers

local configuration files are not loading and ngsw.json?ngsw-cache-bust failing in offline mode of Angular 15 PWA application

I Added PWA package to my angular application. Angular CLI version is 15.2.9 and serviceworker version is also 15.2.9. I am facing an issue with the service worker. The service worker is registered on its own through the app.module. It works fine in…
0
votes
0 answers

angular service worker caching every request no matter what even i'm hard reloading still it caching every request which not even in config urls

why my every request is being cached when even did't mentioned anything about whose api address to get cached, It seems like the ngsw-worker.js is not following the ngsw.json configs image 1 => here is the first image of api which is everytime being…
0
votes
1 answer

Angular PWA caches requests even with freshness strategy

I'm trying to solve an issue with Angular (14) and the service worker, that is constantly fetching some answer in the cache rather than querying from backend api for a set of routes, although these routes are listed in my ngsw-config.json in a…
user7330689
  • 21
  • 1
  • 2
0
votes
1 answer

modifying angular ngsw-worker.js

I need to mdify the ngsw-worker.js file in angular14, but I am wondering is it possible or not!? and how can I rename the ngsw-worker.js to like ngsw.js? this file is located in my app node-module
Hesam Akbari
  • 1,071
  • 1
  • 5
  • 14
1
2