VersionReadyEvent UpdateInfo Property
See original GitHub issueWhich @angular/* package(s) are relevant/releated to the feature request?
service-worker
Description
Regarding VersionReadyEvent’s currentVersion and latestVersion objects, is it possible to have them contain a new property updateInfo: string
so that we can use this updateInfo to customize or set the update notification text?
interface VersionReadyEvent { type: ‘VERSION_READY’ currentVersion: {…} latestVersion: {…} }
https://angular.io/api/service-worker/SwUpdate
import {filter, map} from 'rxjs/operators';
// ...
const updatesAvailable = swUpdate.versionUpdates.pipe(
filter((evt): evt is [VersionReadyEvent](https://angular.io/api/service-worker/VersionReadyEvent) => evt.type === 'VERSION_READY'),
map(evt => ({
type: 'UPDATE_AVAILABLE',
current: evt.currentVersion,
available: evt.latestVersion,
})));
Proposed solution
Regarding VersionReadyEvent’s currentVersion and latestVersion objects, is it possible to have them contain a new property updateInfo: string
so that we can use this updateInfo to customize or set the update notification text?
Alternatives considered
Create an extra endpoint to set the update text
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
SwUpdate
Property, Description ... Emits a VersionReadyEvent event whenever a new version has been downloaded and is ready for activation.
Read more >Angular SwUpdate activated deprication
I believe activated and activateUpdate() are different things. You call activateUpdate() , then when it's done, activated happens.
Read more >Where does entity_rules.json get generated? - IBM/Transition- ...
I trained a model according to the instructions, and it seems like there was a file entity_rules.json that was supposed to be generated....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s a great idea, @Jun711 👍 Would you be up to creating a PR to update the docs? Alternatively, maybe you could create a GitHub issue to track this.
@gkalpak Thank you, it works. I suggest adding a link to SW Configuration page or creating a description page that describes what appData is so that users who read
VersionReadyEvent
and related pages can figure out what appData is without having to search