I'm trying to add data to existing data within Firebase using AngularFire my data currently looks like this, very simple list of clients:
clients
--Firebase UID
----client: Client1
--Firebase UID
----client: Client2
--Firebase UID
----client: Client3
But I want to be able to add under the client sections such as team with a list of team members and some of their details. eg
--Firebase UID
----client: Client1
------team: {Bob: {email: address, position: developer}, Peter: {email: address, position: developer}}
--Firebase UID
----client: Client2
--Firebase UID
----client: Client3
------team: {Bob: {email: address, position: developer}}
This is my current code:
var firebaseURL = 'https://<myfirebase>.firebaseio.com/clients';
$scope.clients.team = {Bob: {email: address, position: developer}, Peter: {email: address, position: developer}};
$scope.clients.$save(Client1);
All I keep getting is the following error:
Error: Firebase.set failed: First argument contains undefined at Error (native)
I've looked at the AngularFire documentation here https://www.firebase.com/docs/angular/reference.html#save-key and believe I've followed it correctly.