Skip to content

Instantly share code, notes, and snippets.

@marcusmotill
Created April 22, 2016 14:12
Show Gist options
  • Save marcusmotill/f8b227a900936db34a31adf0b2fbe5b4 to your computer and use it in GitHub Desktop.
Save marcusmotill/f8b227a900936db34a31adf0b2fbe5b4 to your computer and use it in GitHub Desktop.
var rootFolder = $firebaseObject(FolderService.getFolders($scope.courseID));
//reference to rootFolder is created and can be used, once the data is loaded
//it will show up in scope
//or wait till loaded like below
rootFolder.$loaded().then(function(){
//do stuff with rootFolder
})
...
getFolders: function(courseID) {
return new Firebase(FirebaseUrl).child("folders/" + courseID);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment