I've got an array. If someone reserve a table, reserve in the array is set to true.
$rootScope.tafels = [
{id: 0, text:'table 2a, 4 persons.', reserve:false},
{id: 1, text:'table 3b, 8 persons.', reserve:false}
];
And I've got an function for returning the length of the array:
$rootScope.getTotaalTafels = function()
{ return $rootScope.tafels.length; };
Now the difficult part that I can not solve, maybe you can:
I want to return the total tables that are not reserved, with my function showed above. How do I apply a filter to it?