Binding data of GANTT with angularJS scope

Hello to all of u,

i’m an Angular’s beginer and i discovered dhmltx GANTT. My objective is to integrate Dhtmlx GANTT to my angularAPP and i did it because of the tuto available on this site.
But, my objective is :
When i drag or move a task on DHTMLX gantt, i want my scope to be updated directly like when i use ng-model in a input.
How can i do this ?
Help me pleeease :’(

Thanks in advance

Hello.

Before gantt initialization you could add necessary event handlers to gantt. (onAfterTaskAdd, onAfterTaskUpdate, onAfterTaskDelete, possibly onTaskDrag).
See articles:
docs.dhtmlx.com/gantt/api__gantt … event.html
docs.dhtmlx.com/gantt/api__gantt … event.html
docs.dhtmlx.com/gantt/api__gantt … event.html
docs.dhtmlx.com/gantt/api__gantt … event.html

In this handlers you could update your scope with necessary changes and call scope.$apply ( docs.angularjs.org/api/ng/type/ … ope#$apply ).
After this all the watchers of current scope will be executed.