简体   繁体   中英

Run Angular6 Application in offline mode

I am working on Angular 6 application. One of the feature expected is that even if the web server network is not available i should be able to run my Angular application in browser in offline mode. I should be able to close the browser and open again when required. Next time if network is available application can start in online mode. Is this possible?

Yes that's possible, that is one of the great features of a service-worker. Just remember that it would be possible because it saves the last state available of the page in cookies, so it is possible if the cookies are not deleted in the browser and it would depend of the browser the user has too.

I recommend you to read the angular's documentation about it:

https://angular.io/guide/service-worker-intro

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM