{"action":"created","issue":{"url":"https://api.github.com/repos/marceljuenemann/angular-drag-and-drop-lists/issues/76","labels_url":"https://api.github.com/repos/marceljuenemann/angular-drag-and-drop-lists/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/marceljuenemann/angular-drag-and-drop-lists/issues/76/comments","events_url":"https://api.github.com/repos/marceljuenemann/angular-drag-and-drop-lists/issues/76/events","html_url":"https://github.com/marceljuenemann/angular-drag-and-drop-lists/issues/76","id":88011440,"number":76,"title":"Need to save every time an item is dragged","user":{"login":"crisoberillo","id":6506257,"avatar_url":"https://avatars.githubusercontent.com/u/6506257?v=3","gravatar_id":"","url":"https://api.github.com/users/crisoberillo","html_url":"https://github.com/crisoberillo","followers_url":"https://api.github.com/users/crisoberillo/followers","following_url":"https://api.github.com/users/crisoberillo/following{/other_user}","gists_url":"https://api.github.com/users/crisoberillo/gists{/gist_id}","starred_url":"https://api.github.com/users/crisoberillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crisoberillo/subscriptions","organizations_url":"https://api.github.com/users/crisoberillo/orgs","repos_url":"https://api.github.com/users/crisoberillo/repos","events_url":"https://api.github.com/users/crisoberillo/events{/privacy}","received_events_url":"https://api.github.com/users/crisoberillo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-13T14:19:51Z","updated_at":"2015-07-10T00:42:21Z","closed_at":null,"body":"Is there a way I can save the list every time the drag is complete?\r\nI tryed to catch a 'dragend' event without success. I'm only able to catch a 'drop' event, but when it fires, the list is not changed yet.\r\n\r\nTo achieve the catch of 'drop' event I created a new attribute directive and in his link function I do:\r\n```\r\nelement.bind('drop', function () {\r\n    $rootScope.$emit('DROP-EVENT');\r\n});\r\n```\r\nIn my controller:\r\n```\r\n$rootScope.$on('DROP-EVENT', function () {\r\n    console.log(\"DROP-EVENT fired:\", $scope.list); //instead of $scope.save(); just for debug\r\n});\r\n```\r\n\r\nAnyone knows a solution?"},"comment":{"url":"https://api.github.com/repos/marceljuenemann/angular-drag-and-drop-lists/issues/comments/120185444","html_url":"https://github.com/marceljuenemann/angular-drag-and-drop-lists/issues/76#issuecomment-120185444","issue_url":"https://api.github.com/repos/marceljuenemann/angular-drag-and-drop-lists/issues/76","id":120185444,"user":{"login":"marceljuenemann","id":2447596,"avatar_url":"https://avatars.githubusercontent.com/u/2447596?v=3","gravatar_id":"","url":"https://api.github.com/users/marceljuenemann","html_url":"https://github.com/marceljuenemann","followers_url":"https://api.github.com/users/marceljuenemann/followers","following_url":"https://api.github.com/users/marceljuenemann/following{/other_user}","gists_url":"https://api.github.com/users/marceljuenemann/gists{/gist_id}","starred_url":"https://api.github.com/users/marceljuenemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marceljuenemann/subscriptions","organizations_url":"https://api.github.com/users/marceljuenemann/orgs","repos_url":"https://api.github.com/users/marceljuenemann/repos","events_url":"https://api.github.com/users/marceljuenemann/events{/privacy}","received_events_url":"https://api.github.com/users/marceljuenemann/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T00:42:21Z","updated_at":"2015-07-10T00:42:21Z","body":"Maybe I'm missing something, but wouldn't the angular way of implementing this be $watchCollection?"}}