How to sync offline saved data with remote server automatically in ionic 2


I am saving data using SQLite in offline mode. How do I sync offline saved data with server automatically.
I’m looking something similar like broadcast receiver in android. Is it possible in ionic 2?If yes How?


You should try couchdb.
It comes with build in offline sync functionality


Can you share code or any link for reference?