-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access Navigator.serviceWorker from inside the app #10511
Comments
Hello! Thanks for opening an issue with us! As this seems like more of a support question i will urge that you ask this question on our forum or on our slack channel. Thanks for using Ionic! |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Ionic version: (check one with "x")
[ ] 1.x
[ x] 2.x
I'm submitting a ... (check one with "x")
[ ] bug report
[x ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
When trying to access Navigator.serviceWorker() from inside the app (any .ts file such as app.component.ts), I get the following error:
Property 'serviceWorker' does not exist on type 'Navigator'.
Expected behavior:
property serviceWorker exists and also imported by ionic 2 using sw-toolbox, why I can access it only from the
index.html
as mentioned in the documentation. Why I can't access the service worker from inside my app?Related code:
Other information:
May be releated: microsoft/TypeScript#11781
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):The text was updated successfully, but these errors were encountered: