Cheatography
https://cheatography.com
One-page Cheatsheet for Firebase and AngularFire
This is a draft cheat sheet. It is a work in progress and is not finished yet.
Firebase + AngularFire Cheatsheet
Firebase |
AngularFire |
Coming soon |
$firebaseArray Service Methods |
|
.add(data) - Creates a new record in the array. Should be used in place of push() or splice(). |
|
$remove(recordOrIndex) - Removes an existing item from the array. Should be used in place of pop() or splice(). |
|
$save(recordOrIndex) Saves an existing item in the array. |
|
$getRecord(key) Given a Firebase database key, returns the corresponding item from the array. It is also possible to find the index with $indexFor(key). |
|
$loaded() Returns a promise which resolves after the initial records have been downloaded from our database. This is only called once and should be used with care. See Extending the Services for more ways to hook into server events. |
|
$firebaseArray Meta Fields on the object |
|
$id The key for each record. This is equivalent to each record's path in our database as it would be returned by ref.key(). |
|
$priority The priority of each child node is stored here for reference. Changing this value and then calling $save() on the record will also change the priority on the server and potentially move the record in the array. |
|
$value If the data for this child node is a primitive (number, string, or boolean), then the record itself will still be an object. The primitive value will be stored under $value and can be changed and saved like any other field. |
|
|
|