I am attempting to retrieve data from firabase by getting the $id from routeparams and then syncing as object and retrieving individual pieces of the data with data.(childnamehere). This is successful when retrieving the meta i.e. data.$id but not when retrieving my own data i.e. data.name.. I have reviewed the documentation but can't figure out why I can't console.log (in this case) courseUnique.name ? Any help would be appreciated.
else if (action === "view") {
var courseId = $routeParams.id;
var sync = $firebase(coursesRef.child(courseId));
var courseUnique = sync.$asObject();
var id = courseUnique.$id;
var name = courseUnique.name;
console.log(courseId, courseUnique, id, name);
console output for above is:
-JhgqkeFyfvS9nh5bKyK FirebaseObject {$$conf: Object, $id: "-JhgqkeFyfvS9nh5bKyK", $priority: null, $save: function, $remove: function…} undefined