I'm struggling to grasp the concept of deleting an item from my Firebase database. I have successfully created a function (saveEmployee) to add items, but removing them is where I hit a roadblock.
HTML
<tbody ng-repeat="employee in employees">
<tr>
<td>{{employee.employeeName}}</td>
<td>{{employee.employeeAge}}</td>
<td><a class="btn btn-danger" ng-click="removeEmployee(employee.employeeName)" >Delete</a></td>
</tr>
</tbody>
JS
$scope.removeEmployee = function(employeeName) {
console.log(employeeName);
$scope.myData.child(employeeName).remove();
};