Skip to content

Instantly share code, notes, and snippets.

@javebratt
Created June 14, 2017 16:55
Show Gist options
  • Save javebratt/b3b910ad19b8a2582eeff3c3bcc5aa03 to your computer and use it in GitHub Desktop.
Save javebratt/b3b910ad19b8a2582eeff3c3bcc5aa03 to your computer and use it in GitHub Desktop.
// When using a provider to call AngularFire2
// which syntax do you use the most
// Provider
getItems(): FirebaseListObservable<any> {
return afDatabase.list('/items');
}
// Inside the class do you:
this.items = providerName.getItems();
// Or do you
providerName.getItems.subscribe( itemSnap => {
this.items = itemSnap;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment