SwUpdate in Angular | Check for update in Angular PWA | Progressive Web Apps Development

preview_player
Показать описание
The SwUpdate service gives you access to events that indicate when the service worker has discovered an available update for your app and you can ask the user to update the same.

SwUpdate has three properties i.e. available, activated & isEnabled, you can use these events to notify the user to update the app. SwUpdate has two methods i.e. checkForUpdate and activateUpdate

#ServiceWorkers #AngularPwa #SwUpdate

Thanks for watching...
Рекомендации по теме
Комментарии
Автор

use 'versionUpdates' instead.

SumitN
Автор

This PWA series is really helpful. Hope you got more subscribers. Thanks

fluffymaverick
Автор

Good work. same i have implemented on my angular ver 11. but getting build errors with the pwa lib. Is this works only for PWA apps??

PI-Thoughts
Автор

Is there a way to save user entered data when app is offline and updating the server database when online?

sindhurasastry
Автор

Hi. Somehow for me after the first time, polling stops(for the checkforupdate method. What do you think could be the reason? Thanks in advance.

sakshitripathi
Автор

This video helped a lot, my friend. Thank you!

alissonsantos
Автор

At 9:16 why does it take a brief amount of time to load the popup

siddheshthipse
Автор

I run http-server on 8080 port and install the pwa app after these I was update the code, build and then again run http-server on port 8080 gives error port is already in use .what can i do for get updated version of app.

rootbabu
Автор

Thanks for sharing and please avoid creating subscriptions into another subscriptions!

jdnichollsc
Автор

Just wondering if you set time interval of 8 hours, then in between of that 8 hours you uploaded changes to your frontend then upload to server, is there a way that it automatically listens to your changes and does not need to wait for that 8 hour interval to check for changes? Or the prompt will just pop up informing users to update?

Thanks this helped a lot.

fluffymaverick
Автор

Is there any way to make Angular App as Installable and should work only in Online mode?

I want to disable offline mode

rasit
Автор

Can we get the 'update available' popup without reloading the page and without checking at regularly calling swUpdate.available at regular interval? Like may be using observer..

komaldua
Автор

Hi Subrat, greetings from Serbia! I enjoyed watching your tutorial. However, when I replicate your code in my app I get weird behavior. Every time checkForUpdates is supposed to be called, it is not called only once, but the number of times it gets called grows exponentially (1, 2, 4, 8, 64, something like that). In other words, it is not that the function is called, then there is a 3 seconds break and then it is called again and so on. Instead, it is called once, then there is a break then it is called twice, etc. Do you have any idea what might be going on?

damircicic
Автор

I could't understand your language :D

hamidmottaghian