eHealthAfrica/ehealth-couch-sync — pull request #1 by ni-ka (2014-10-12 01:49:23+00:00)
Title: Add status handling to couch sync service

This adds a status to the couch sync service. Status can be "sync", "online", "offline". The status can be observed using sync.onStatusChange().

The idea is to reduce the number of pouchdb event handler registrations throughout the application. This can also be used by controllers to know when they can fetch data using the views. Maybe a sync.ready() method should be used (which is called when status moves to "online").