{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue/issues/2153","labels_url":"https://api.github.com/repos/vuejs/vue/issues/2153/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue/issues/2153/comments","events_url":"https://api.github.com/repos/vuejs/vue/issues/2153/events","html_url":"https://github.com/vuejs/vue/issues/2153","id":126298623,"number":2153,"title":"Associate multiple events","user":{"login":"brunocascio","id":2397875,"avatar_url":"https://avatars.githubusercontent.com/u/2397875?v=3","gravatar_id":"","url":"https://api.github.com/users/brunocascio","html_url":"https://github.com/brunocascio","followers_url":"https://api.github.com/users/brunocascio/followers","following_url":"https://api.github.com/users/brunocascio/following{/other_user}","gists_url":"https://api.github.com/users/brunocascio/gists{/gist_id}","starred_url":"https://api.github.com/users/brunocascio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunocascio/subscriptions","organizations_url":"https://api.github.com/users/brunocascio/orgs","repos_url":"https://api.github.com/users/brunocascio/repos","events_url":"https://api.github.com/users/brunocascio/events{/privacy}","received_events_url":"https://api.github.com/users/brunocascio/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-12T23:00:02Z","updated_at":"2016-01-13T00:44:16Z","closed_at":"2016-01-13T00:36:54Z","body":"Hi!\r\n\r\nI need associate some events to one function. Actually my code is this:\r\n\r\n```html\r\n<button \r\n  type=\"button\" \r\n  class=\"btn btn-lg btn-default\"\r\n  v-touch:press=\"handle(positions.LEFT, $event)\"\r\n  v-touch:tap=\"handle(positions.LEFT, $event)\"\r\n  v-touch:pressup=\"handle(positions.RELEASE_LEFT, $event)\">\r\n LEFT\r\n</button>\r\n```\r\n\r\nI would like to code it like this:\r\n\r\n```html\r\n<button \r\n  type=\"button\" \r\n  class=\"btn btn-lg btn-default\"\r\n  v-touch=\"handle(positions.LEFT, $event)\">\r\n LEFT\r\n</button>\r\n```\r\n\r\nThen in my `handle(pos, event)` function:\r\n\r\n```js\r\nhandle: function(position, event) {\r\n  this.position = position;\r\n  if (event.type == 'tap') {\r\n    this._handleTap();\r\n  } else if (event.type == 'press') {\r\n    this._handlePress();\r\n  } else {\r\n    this._release();\r\n  }\r\n},\r\n```\r\n\r\nHow to i make it?"},"comment":{"url":"https://api.github.com/repos/vuejs/vue/issues/comments/171112820","html_url":"https://github.com/vuejs/vue/issues/2153#issuecomment-171112820","issue_url":"https://api.github.com/repos/vuejs/vue/issues/2153","id":171112820,"user":{"login":"brunocascio","id":2397875,"avatar_url":"https://avatars.githubusercontent.com/u/2397875?v=3","gravatar_id":"","url":"https://api.github.com/users/brunocascio","html_url":"https://github.com/brunocascio","followers_url":"https://api.github.com/users/brunocascio/followers","following_url":"https://api.github.com/users/brunocascio/following{/other_user}","gists_url":"https://api.github.com/users/brunocascio/gists{/gist_id}","starred_url":"https://api.github.com/users/brunocascio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunocascio/subscriptions","organizations_url":"https://api.github.com/users/brunocascio/orgs","repos_url":"https://api.github.com/users/brunocascio/repos","events_url":"https://api.github.com/users/brunocascio/events{/privacy}","received_events_url":"https://api.github.com/users/brunocascio/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T00:44:16Z","updated_at":"2016-01-13T00:44:16Z","body":"Really thanks @amirrustam. The code doesn't work, but is an error of vue-touch library. I'll open a pull-request to contribute. :)"}}