Having an issue logging the service.title
to the console as it keeps returning as a strange object.
.factory('service', function($firebase, FBURL, $routeParams) {
var ref = new Firebase(FBURL + "services/" + $routeParams.serviceId);
var title = $firebase(ref.child('title')).$asObject();
return {
id: $routeParams.serviceId,
title: title
}
})
.controller('ServiceController', function ($scope, $firebase, service, $routeParams, FBURL) {
$scope.service = service;
console.log($scope.service.title);
})
When checking the console, it shows:
Trying to access that $value
in the log. Is there anyone who can assist with what might be causing this issue?
Your help is appreciated!