Gantt second instance

Hi people I got an small problem trying to instance a second gantt

I’m using for that purpose 2 different angular directives, like these:

app.directive(‘ganttControl’, [’$window’, ‘$rootScope’, ‘$cookieStore’, function ($window, $rootScope, $cookieStore)


app.directive(‘ganttControl1’, [’$window’, ‘$rootScope’, ‘$cookieStore’, function ($window, $rootScope, $cookieStore)

the idea is to use each one of them in a different page.

but when I’m using the second one -ganttControl1-, the code inside the -ganttControl- directive is also executing, I think this is because the gantt is some kind of global varible, I mean I wasn’t able to create 2 difference instances of this object to have separate behaviours.

I don’t know if I explain myself correctly about my problem.

If I’m getting the wrong idea please let me know, of if there is any possible solution for my problem.

Regards Alejandro

this is by design of the component(the same limitation as with dhtmlxScheduler), the gantt is defined as a global object. So with current version you can’t have multiple instances.
If you not showing two gantts at the same time, you may try working with a single instance. It should be possible since you can change data and configuration of the gantt in a runtime(so you could apply needed configurations to the chart before showing it)