I decided it was probably best not to use AngularFire in this scenario, but rather to use the Firebase SDK directly. AngularFire 3-way bindings make it very difficult to capture changes in $ scope for local storage. Using the SDK allows you to intercept FB changes and save them directly to local storage, as well as update the $ scope.
Similarly, making changes to the FB using ref.update () is trivial and can be done along with updating the local storage.
If the application starts offline (found from .firebasio.com / .info / connected), just use local storage, as well as Kato suggested a โsimpleโ Firebase connection. I do this by simply calling empty ref.update({}); . Then, when making changes to the data in the local storage, also perform regular FB / push / save updates. Then, when the application connects, a copy of the FB in memory will be synchronized with the server.
source share