Firebase Flashcards

1
Q

install angularfire2

A

npm install angularfire2 firebase –save
adjust environments.ts
add “AngularFireModule.initializeApp(environment.firebase)” to imports
import AngularFireDatabaseModule too

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

disguise the last characters of your API key by

A

changing it from WXI to IXW

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

what to inject from AngularFire2

A

constructor(db: AngularFireDatabase)

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

how to bind to a list

A

items: FirebaseListObservable;
constructor(db: AngularFireDatabase) {
this.items = db.list(‘/items’);
}

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

how to retrieve an object

A

db.object(‘/item’)

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

FirebaseObservable methods

A

set(value) is a destructive update
update(value) is nondestructive (only updates included values)
remove()

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

Data retrieved from the object binding contains

A

special properties retrieved from the unwrapped Firebase DataSnapshot

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

What is the metafield $key

A

The key for each record. This is equivalent to each record’s path in our database as it would be returned by ref.key()

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

What is the metafield $value

A

If a primitive, the primitive value will be stored under $value and can be changed and saved like any other field

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

By default, AngularFire2 unwraps the

A

Firebase DataSnapshot, but you can get the data as the original snapshot by specifying the preserveSnapshot option

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

How to retrieve a Firebase list by query

A

db.list(‘/items’, {
query: {
limitToLast: 10,
orderByKey: true
}
})

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