Reputation: 2652
Hi I have the following setup to bind my FirebaseArray in angularjs in order to sync the list when a date changes.
var vm = this;
vm.startDate = {
startDate: moment().startOf('month'),
endDate: moment().endOf('month')
};
vm.bonnen = $firebaseArray(bonCollection($rootScope.user.uid, vm.startDate.startDate, vm.startDate.endDate));
vm.bonnen.$bindTo(vm, "vm.startDate");
However, I keep getting the following error
Error: vm.bonnen.$bindTo is not a function. (In 'vm.bonnen.$bindTo(vm, "vm.startDate")', 'vm.bonnen.$bindTo' is undefined)
What am I possibly doing wrong here?
Upvotes: 0
Views: 165
Reputation: 28750
$bindTo is only available for $firebaseObject
Discussion on why it can't be: https://github.com/firebase/angularfire/issues/600
Upvotes: 1