{"action":"opened","issue":{"url":"https://api.github.com/repos/angular-gantt/angular-gantt/issues/448","labels_url":"https://api.github.com/repos/angular-gantt/angular-gantt/issues/448/labels{/name}","comments_url":"https://api.github.com/repos/angular-gantt/angular-gantt/issues/448/comments","events_url":"https://api.github.com/repos/angular-gantt/angular-gantt/issues/448/events","html_url":"https://github.com/angular-gantt/angular-gantt/issues/448","id":95232219,"number":448,"title":"looping issue","user":{"login":"simkeyur","id":3363966,"avatar_url":"https://avatars.githubusercontent.com/u/3363966?v=3","gravatar_id":"","url":"https://api.github.com/users/simkeyur","html_url":"https://github.com/simkeyur","followers_url":"https://api.github.com/users/simkeyur/followers","following_url":"https://api.github.com/users/simkeyur/following{/other_user}","gists_url":"https://api.github.com/users/simkeyur/gists{/gist_id}","starred_url":"https://api.github.com/users/simkeyur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simkeyur/subscriptions","organizations_url":"https://api.github.com/users/simkeyur/orgs","repos_url":"https://api.github.com/users/simkeyur/repos","events_url":"https://api.github.com/users/simkeyur/events{/privacy}","received_events_url":"https://api.github.com/users/simkeyur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-15T16:12:37Z","updated_at":"2015-07-15T16:12:37Z","closed_at":null,"body":"I am trying to loop tasks like this:\r\n\r\n```javascript\r\n\r\nangular.module('angularGanttDemoApp')\r\n.service('Sample', function Sample() {\r\n    return {\r\n        getSampleData: function() {\r\n        \t\r\n            return [\r\n\t\t\t\tfor(i=0; i<6; i++){\r\n                    {name: ganttArray[i][0], movable: {allowResizing: false}, tasks: [\r\n\t\t\t\t\t\t{name: ganttArray[i][0], \r\n\t\t\t\t\t\t\tcolor: '#9FC5F8', \r\n\t\t\t\t\t\t\tfrom: new Date(ganttArray[i][1], ganttArray[i][2], ganttArray[i][3], ganttArray[i][4], ganttArray[i][5], ganttArray[i][6]), \r\n\t\t\t\t\t\t\tto: new Date(ganttArray[i+1][1], ganttArray[i+1][2], ganttArray[i+1][3], ganttArray[i+1][4], ganttArray[i+1][5], ganttArray[i+1][6]),\r\n                            progress: {percent: 100, color: '#3C8CF8'}, \r\n                            movable: false},\r\n                    ]},\r\n\t\t\t\t}\r\n                ];\r\n\t\t\t\t\r\n        }\r\n    };\r\n})\r\n```\r\n\r\nbut its giving me bunch of errors. Any better way to approach this?"}}