Taking this super simple controller for example:
var app = angular.module("app", ['firebase']);
app.constant('FBURL', 'https://groupstest.firebaseio.com/');
app.controller("ApplicationController", [
'$scope',
'$firebase',
'FBURL',
function($scope, $firebase, FBURL) {
var groups = $firebase(new Firebase(FBURL + 'groups'));
$scope.groups = groups;
}]);
Given that the above code is all I need in order to be able to iterate over
the groups in my Firebase DB using ng-repeat....
1. Does doing: $firebase(new Firebase(FBURL + 'groups')).$child("2"); load
all groups before accessing the child or does it only load data associated
with the child node?
2. What about: $firebase(new Firebase(FBURL + 'groups/2')); Is that the
same or different to the line above?
Finally as a bonus question ;-) .... If I do this:
$firebase(new Firebase(FBURL + 'groups/1'));
$firebase(new Firebase(FBURL + 'groups/2'));
$firebase(new Firebase(FBURL + 'groups/3'));
How many Firebase connections do I now have open? 1 or 3? Is this an
inefficient thing to do?
It's possible I'm not fully understanding how websockets works so my
apologies if that is the case. I'm used to a more traditional HTTP API
setup.
--
You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/c881a2ce-b2a5-4011-bb6c-168c2df4ea38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.