So, I have it, for example, in firebase
clients {
invoices: {
}
}
}
I am returning all this with a single ref:
.controller('singleClientController', function($scope, $firebaseObject, fbUrl, $routeParams) {
var id = $routeParams.id;
var singleRef = new Firebase(fbUrl+'/clients/'+id);
var client = this;
client.details = $firebaseObject(singleRef);
})
so in my html i am trying to return $idfor client and invoice. I can get no problems from the client {{client.details.$id}}, but when I try to do the same with the account ID {{invoice.$id}}, I get nothing.
Invoices are displayed through foreach as follows:
<tr ng-repeat="invoice in client.details.invoices">
<td>
<a href="#/invoices/details/{{invoice.$id}}/{{client.details.$id}}">
{{invoice.settings.number}}
</a>
</td>
...
</tr>
Is it because invoices are inside the customer? If so, how would you return the identifier for the invoices? It drives me crazy! Please, help!
For a better understanding of my firebase settings, here is a screenshot of what I'm talking about.

source
share