{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/templating/issues/102","labels_url":"https://api.github.com/repos/aurelia/templating/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/templating/issues/102/comments","events_url":"https://api.github.com/repos/aurelia/templating/issues/102/events","html_url":"https://github.com/aurelia/templating/issues/102","id":89258992,"number":102,"title":"Add @callable decorator","user":{"login":"stoffeastrom","id":682243,"avatar_url":"https://avatars.githubusercontent.com/u/682243?v=3","gravatar_id":"","url":"https://api.github.com/users/stoffeastrom","html_url":"https://github.com/stoffeastrom","followers_url":"https://api.github.com/users/stoffeastrom/followers","following_url":"https://api.github.com/users/stoffeastrom/following{/other_user}","gists_url":"https://api.github.com/users/stoffeastrom/gists{/gist_id}","starred_url":"https://api.github.com/users/stoffeastrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoffeastrom/subscriptions","organizations_url":"https://api.github.com/users/stoffeastrom/orgs","repos_url":"https://api.github.com/users/stoffeastrom/repos","events_url":"https://api.github.com/users/stoffeastrom/events{/privacy}","received_events_url":"https://api.github.com/users/stoffeastrom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-18T10:46:38Z","updated_at":"2015-06-18T14:33:55Z","closed_at":null,"body":"For *custom attributes* it would be nice to be able to do\r\n\r\n```\r\n@customAttribute(\"some-behavior\")\r\n@callable({\r\n  name: \"someFunction\",\r\n  defaultFunction: function() {}\r\n})\r\nexport class SomeBehavior {}\r\n\r\n<div some-behavior=\"someFunction.call: whatever();\"r></div>\r\n```\r\n\r\nThen I always know i have a function reference in my *custom attribute* and doesn't have to check if the function exists..\r\n\r\nThoughts?\r\n"},"comment":{"url":"https://api.github.com/repos/aurelia/templating/issues/comments/113174254","html_url":"https://github.com/aurelia/templating/issues/102#issuecomment-113174254","issue_url":"https://api.github.com/repos/aurelia/templating/issues/102","id":113174254,"user":{"login":"stoffeastrom","id":682243,"avatar_url":"https://avatars.githubusercontent.com/u/682243?v=3","gravatar_id":"","url":"https://api.github.com/users/stoffeastrom","html_url":"https://github.com/stoffeastrom","followers_url":"https://api.github.com/users/stoffeastrom/followers","following_url":"https://api.github.com/users/stoffeastrom/following{/other_user}","gists_url":"https://api.github.com/users/stoffeastrom/gists{/gist_id}","starred_url":"https://api.github.com/users/stoffeastrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoffeastrom/subscriptions","organizations_url":"https://api.github.com/users/stoffeastrom/orgs","repos_url":"https://api.github.com/users/stoffeastrom/repos","events_url":"https://api.github.com/users/stoffeastrom/events{/privacy}","received_events_url":"https://api.github.com/users/stoffeastrom/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T14:33:55Z","updated_at":"2015-06-18T14:33:55Z","body":"Also if I do like this\r\n\r\n```\r\n@bindable({\r\n  name: \"allowDrag\",\r\n  defaultValue: function() { return false; }\r\n})\r\n```\r\nThen this.allowDrag will be false not a function.\r\n\r\nSo I wonder if there is something to support this? How do we define a callable optional function for custom attribute?"}}