Created
November 4, 2017 15:48
-
-
Save webmaxru/b60935d68c30df7ea5958af972a9b9e3 to your computer and use it in GitHub Desktop.
checkForUpdate and activateUpdate methods of SwUpdate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkForUpdate() { | |
console.log('[App] checkForUpdate started') | |
this.swUpdate.checkForUpdate() | |
.then(() => { | |
console.log('[App] checkForUpdate completed') | |
}) | |
.catch(err => { | |
console.error(err); | |
}) | |
} | |
activateUpdate() { | |
console.log('[App] activateUpdate started') | |
this.swUpdate.activateUpdate() | |
.then(() => { | |
console.log('[App] activateUpdate completed') | |
this.winRef.nativeWindow.location.reload() | |
}) | |
.catch(err => { | |
console.error(err); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment