{"action":"opened","issue":{"url":"https://api.github.com/repos/pieroblunda/mean/issues/27","labels_url":"https://api.github.com/repos/pieroblunda/mean/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/pieroblunda/mean/issues/27/comments","events_url":"https://api.github.com/repos/pieroblunda/mean/issues/27/events","html_url":"https://github.com/pieroblunda/mean/issues/27","id":103799564,"number":27,"title":"ngEnter","user":{"login":"pieroblunda","id":5834891,"avatar_url":"https://avatars.githubusercontent.com/u/5834891?v=3","gravatar_id":"","url":"https://api.github.com/users/pieroblunda","html_url":"https://github.com/pieroblunda","followers_url":"https://api.github.com/users/pieroblunda/followers","following_url":"https://api.github.com/users/pieroblunda/following{/other_user}","gists_url":"https://api.github.com/users/pieroblunda/gists{/gist_id}","starred_url":"https://api.github.com/users/pieroblunda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieroblunda/subscriptions","organizations_url":"https://api.github.com/users/pieroblunda/orgs","repos_url":"https://api.github.com/users/pieroblunda/repos","events_url":"https://api.github.com/users/pieroblunda/events{/privacy}","received_events_url":"https://api.github.com/users/pieroblunda/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pieroblunda/mean/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-28T21:32:36Z","updated_at":"2015-08-28T21:32:36Z","closed_at":null,"body":"```javascript\r\napp.directive('ngEnter', function () {\r\n    return function (scope, element, attrs) {\r\n        element.bind(\"keydown keypress\", function (event) {\r\n            if(event.which === 13) {\r\n                scope.$apply(function (){\r\n                    scope.$eval(attrs.ngEnter);\r\n                });\r\n \r\n                event.preventDefault();\r\n            }\r\n        });\r\n    };\r\n});\r\n```"}}