Created
June 14, 2017 16:55
-
-
Save javebratt/b3b910ad19b8a2582eeff3c3bcc5aa03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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