Firebase Flashcards

1
Q

Create firebase object

A

ref = new Firebase ‘https://gtrack.firebaseio.com/tracks’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Connect firebase service to angular

A

ref = new Firebase ‘https://gtrack.firebaseio.com/tracks’

tracks = $firebase(ref)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Get data as objects

A

tracks = $firebase(ref)

$scope.tracks = tracks.$asObject()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Get actual timestamp

A

Firebase.ServerValue.TIMESTAMP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Delete object

A

$firebase(ref).remove(key)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Add object

A

$firebase(ref).push(object)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Do something when user authentication changes

A

ref.onAuth(function(authData))
if (authData) : user logged in
else logged out

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Get email from password based authentication data

A

ref = new Firebase config.fireBaseRef
authObj = $firebaseAuth ref
authObj.password.email

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Watch for changes in the data

A

tracksArray = $firebase(ref).$asArray()

tracksArray.$watch (event) ->

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Get data as array

A

tracksArray = $firebase(ref).$asArray()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly