Question

I wanted to sync the text box content to different clients through Angular + Firebase. I have doubt that whenever i type each letter, will the firebase sync with the database?

Will it affect the network bandwidth? Basically How it works?

Était-ce utile?

La solution

If you use AngularFire's 3-way data binding (i.e. the $firebase(ref).$bind method), then each letter you type will be synced with Firebase. The bandwidth requirement will scale with each keystroke.

If bandwidth is a concern and you don't want synchronization per keystroke, there are a couple of other options:

  • Use explicit bindings with AngularFire that only sync to Firebase when you call certain methods like $set() or $save()

  • Use a OT library like Firepad that implements granular collaborative text editing: http://www.firepad.io

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top