{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/631","labels_url":"https://api.github.com/repos/angular/angular/issues/631/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/631/comments","events_url":"https://api.github.com/repos/angular/angular/issues/631/events","html_url":"https://github.com/angular/angular/issues/631","id":57531903,"number":631,"title":"Add support for setting a default Component role","user":{"login":"jelbourn","id":838736,"avatar_url":"https://avatars.githubusercontent.com/u/838736?v=3","gravatar_id":"","url":"https://api.github.com/users/jelbourn","html_url":"https://github.com/jelbourn","followers_url":"https://api.github.com/users/jelbourn/followers","following_url":"https://api.github.com/users/jelbourn/following{/other_user}","gists_url":"https://api.github.com/users/jelbourn/gists{/gist_id}","starred_url":"https://api.github.com/users/jelbourn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelbourn/subscriptions","organizations_url":"https://api.github.com/users/jelbourn/orgs","repos_url":"https://api.github.com/users/jelbourn/repos","events_url":"https://api.github.com/users/jelbourn/events{/privacy}","received_events_url":"https://api.github.com/users/jelbourn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular/milestones/16","labels_url":"https://api.github.com/repos/angular/angular/milestones/16/labels","id":959038,"number":16,"title":"M5: Early Adopters","description":"The goal of this sprint is to enable building of large scale apps. \r\n\r\n- [ ] Basic workflow to get Angular2 running for Early Adapters\r\n  - [ ] JavaScript story\r\n  - [ ] Dart story\r\n- [ ] Formatters\r\n- [ ] WTF Instrumentation\r\n- [ ] Compile Template instead of Component\r\n- [ ] Routing\r\n- [ ] Mobile Gestures\r\n- [ ] XHR","creator":{"login":"mhevery","id":111951,"avatar_url":"https://avatars.githubusercontent.com/u/111951?v=3","gravatar_id":"","url":"https://api.github.com/users/mhevery","html_url":"https://github.com/mhevery","followers_url":"https://api.github.com/users/mhevery/followers","following_url":"https://api.github.com/users/mhevery/following{/other_user}","gists_url":"https://api.github.com/users/mhevery/gists{/gist_id}","starred_url":"https://api.github.com/users/mhevery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhevery/subscriptions","organizations_url":"https://api.github.com/users/mhevery/orgs","repos_url":"https://api.github.com/users/mhevery/repos","events_url":"https://api.github.com/users/mhevery/events{/privacy}","received_events_url":"https://api.github.com/users/mhevery/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":16,"state":"open","created_at":"2015-01-30T23:35:12Z","updated_at":"2015-02-18T18:09:31Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-02-12T22:46:26Z","updated_at":"2015-02-18T18:12:20Z","closed_at":null,"body":"Component configuration should include an option for the default element role.\r\n\r\n```js\r\n@Component({\r\n  selector: 'md-checkbox',\r\n  role: 'checkbox'\r\n})\r\nclass MdCheckbox{ /* ... */ }\r\n```"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/74915844","html_url":"https://github.com/angular/angular/issues/631#issuecomment-74915844","issue_url":"https://api.github.com/repos/angular/angular/issues/631","id":74915844,"user":{"login":"pkozlowski-opensource","id":973550,"avatar_url":"https://avatars.githubusercontent.com/u/973550?v=3","gravatar_id":"","url":"https://api.github.com/users/pkozlowski-opensource","html_url":"https://github.com/pkozlowski-opensource","followers_url":"https://api.github.com/users/pkozlowski-opensource/followers","following_url":"https://api.github.com/users/pkozlowski-opensource/following{/other_user}","gists_url":"https://api.github.com/users/pkozlowski-opensource/gists{/gist_id}","starred_url":"https://api.github.com/users/pkozlowski-opensource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkozlowski-opensource/subscriptions","organizations_url":"https://api.github.com/users/pkozlowski-opensource/orgs","repos_url":"https://api.github.com/users/pkozlowski-opensource/repos","events_url":"https://api.github.com/users/pkozlowski-opensource/events{/privacy}","received_events_url":"https://api.github.com/users/pkozlowski-opensource/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T18:12:20Z","updated_at":"2015-02-18T18:12:20Z","body":"I can take a stab at it. Before jumping to the impl, though, what is the advantage of expressing role in JS as opposed to having it as an attribute in a template? I guess it makes things easier if there are multiple templates, but is there more to it? "}}