Unable to load data in Gantt using angularjs

Hi,

I’m having trouble getting the data to load using angularjs.
I followed the steps here:

In my link function for the directive of where the gantt is getting setup i have:
gantt.parse($scope.ganttvm.tasks, “json”);
gantt.init($elm[0]);

It bombs on the parse with an error in the console:
angular.js:12330 TypeError: i is not a function
at Object.parseDate (http://localServer/libs/gantt/codebase/dhtmlxgantt.js:10:411875)

Hello Andy,
You need to use the parse function only after Gantt is initialized. And it means that you try to load tasks before Gantt itself is loaded.
I have the same error in the snippet:
http://snippet.dhtmlx.com/d4da548f3
But everything works correctly if the command order is correct:
https://snippet.dhtmlx.com/3a7e741de