Gantt + angular : problem on task deletion


I am working on a project which is based on Angular and DHTMLX Gantt. I used the directive you put on the the web site and everything was fine until now. I am working now on the deletion of the tasks and I have a strange behaviour. Instead of deleting the task, this one is put at the end of the gantt chart. You can see the behavior with this fiddle :
The delete button should delete the “Kouri” task which is in AFEQ --> Congo.

I tried the same working without the angular framework and it works. Do you have an idea of the problem?


.myFunction that handles the deletion removes the item from an inner data collection of a gantt without modifying $scope.tasks collection that is parsed into the gantt later in code
So ‘gantt.parse’ restores the original dataset. It’s strange though that it looks differently from the original state.

You could modify the scope data after something has changed in a gantt:

$scope.deleteAssignment = function () { var id = 1005; gantt.deleteTask(id); $scope.tasks = gantt.serialize(); }