{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/3267","labels_url":"https://api.github.com/repos/angular/angular/issues/3267/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/3267/comments","events_url":"https://api.github.com/repos/angular/angular/issues/3267/events","html_url":"https://github.com/angular/angular/issues/3267","id":97046887,"number":3267,"title":"Idea to specify bindings with annotations / decorators on methods rather than in the host configuration","user":{"login":"gionkunz","id":2203704,"avatar_url":"https://avatars.githubusercontent.com/u/2203704?v=3","gravatar_id":"","url":"https://api.github.com/users/gionkunz","html_url":"https://github.com/gionkunz","followers_url":"https://api.github.com/users/gionkunz/followers","following_url":"https://api.github.com/users/gionkunz/following{/other_user}","gists_url":"https://api.github.com/users/gionkunz/gists{/gist_id}","starred_url":"https://api.github.com/users/gionkunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gionkunz/subscriptions","organizations_url":"https://api.github.com/users/gionkunz/orgs","repos_url":"https://api.github.com/users/gionkunz/repos","events_url":"https://api.github.com/users/gionkunz/events{/privacy}","received_events_url":"https://api.github.com/users/gionkunz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-24T12:57:30Z","updated_at":"2015-07-24T13:02:00Z","closed_at":null,"body":"Wouldn't it be nicer to have something like this:\r\n```javascript\r\n@Component({\r\n  selector: 'comp'\r\n})\r\n@View({\r\n  template: ''\r\n})\r\nexport default class Comp {\r\n  @Property({expression: '[attr.test]'})\r\n  set testProp(value: string) {}\r\n\r\n  @Event({name: 'click', stopPropagation: false})\r\n  onClick(event: MouseEvent) {}\r\n}\r\n```\r\n\r\nRather than this:\r\n```javascript\r\n@Component({\r\n  selector: 'comp',\r\n  host: {\r\n    '(click)': 'onClick($event)',\r\n    '[attr.test]': 'testProp'\r\n  }\r\n})\r\n@View({\r\n  template: ''\r\n})\r\nexport default class Comp {\r\n  testProp: string;\r\n  onClick(event: MouseEvent) {}\r\n}\r\n```\r\n\r\nI know it's gonna be a bit different than working in a template but don't you think this is much more convenient?"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/124512949","html_url":"https://github.com/angular/angular/issues/3267#issuecomment-124512949","issue_url":"https://api.github.com/repos/angular/angular/issues/3267","id":124512949,"user":{"login":"gionkunz","id":2203704,"avatar_url":"https://avatars.githubusercontent.com/u/2203704?v=3","gravatar_id":"","url":"https://api.github.com/users/gionkunz","html_url":"https://github.com/gionkunz","followers_url":"https://api.github.com/users/gionkunz/followers","following_url":"https://api.github.com/users/gionkunz/following{/other_user}","gists_url":"https://api.github.com/users/gionkunz/gists{/gist_id}","starred_url":"https://api.github.com/users/gionkunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gionkunz/subscriptions","organizations_url":"https://api.github.com/users/gionkunz/orgs","repos_url":"https://api.github.com/users/gionkunz/repos","events_url":"https://api.github.com/users/gionkunz/events{/privacy}","received_events_url":"https://api.github.com/users/gionkunz/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T13:02:00Z","updated_at":"2015-07-24T13:02:00Z","body":"Also it allows to specify options (and not rely on hard to remember and limited symbol characters)"}}