Show Menu
Cheatography

Firebase + AngularFire Cheat Sheet (DRAFT) by

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 + Angula­rFire Cheatsheet

Firebase
Angula­rFire
Coming soon
$fireb­ase­Array Service Methods
 
.add(data) - Creates a new record in the array. Should be used in place of push() or splice().
 
$remov­e(r­eco­rdO­rIndex) - Removes an existing item from the array. Should be used in place of pop() or splice().
 
$save(­rec­ord­OrI­ndex) Saves an existing item in the array.
 
$getRe­cor­d(key) Given a Firebase database key, returns the corres­ponding item from the array. It is also possible to find the index with $index­For­(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.
 
$fireb­ase­Array 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 potent­ially 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.

$fireb­ase­Object

Methods
Meta