{"action":"created","issue":{"url":"https://api.github.com/repos/toddmotto/angular-styleguide/issues/119","repository_url":"https://api.github.com/repos/toddmotto/angular-styleguide","labels_url":"https://api.github.com/repos/toddmotto/angular-styleguide/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/toddmotto/angular-styleguide/issues/119/comments","events_url":"https://api.github.com/repos/toddmotto/angular-styleguide/issues/119/events","html_url":"https://github.com/toddmotto/angular-styleguide/issues/119","id":174572118,"number":119,"title":"Using require vs bindings in components","user":{"login":"alextsg","id":8051479,"avatar_url":"https://avatars.githubusercontent.com/u/8051479?v=3","gravatar_id":"","url":"https://api.github.com/users/alextsg","html_url":"https://github.com/alextsg","followers_url":"https://api.github.com/users/alextsg/followers","following_url":"https://api.github.com/users/alextsg/following{/other_user}","gists_url":"https://api.github.com/users/alextsg/gists{/gist_id}","starred_url":"https://api.github.com/users/alextsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextsg/subscriptions","organizations_url":"https://api.github.com/users/alextsg/orgs","repos_url":"https://api.github.com/users/alextsg/repos","events_url":"https://api.github.com/users/alextsg/events{/privacy}","received_events_url":"https://api.github.com/users/alextsg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-01T16:45:50Z","updated_at":"2016-09-01T16:53:37Z","closed_at":null,"body":"I noticed that in the components section, it states that the `require` object is for referencing inherited logic alongside `$onInit`. What's the recommendation for using `require` versus putting a function in the component's `bindings`? For example, should I be doing:\r\n\r\n```\r\nrequire : {\r\n   parent: '^parent'\r\n}\r\n...\r\n$ctrl.parent.doStuff();\r\n```\r\nor\r\n```\r\nbindings: {\r\n    doStuff: '&'\r\n}\r\n...\r\n$ctrl.doStuff()\r\n```\r\nThanks! Sorry if this is the wrong place for this!"},"comment":{"url":"https://api.github.com/repos/toddmotto/angular-styleguide/issues/comments/244141766","html_url":"https://github.com/toddmotto/angular-styleguide/issues/119#issuecomment-244141766","issue_url":"https://api.github.com/repos/toddmotto/angular-styleguide/issues/119","id":244141766,"user":{"login":"toddmotto","id":1655968,"avatar_url":"https://avatars.githubusercontent.com/u/1655968?v=3","gravatar_id":"","url":"https://api.github.com/users/toddmotto","html_url":"https://github.com/toddmotto","followers_url":"https://api.github.com/users/toddmotto/followers","following_url":"https://api.github.com/users/toddmotto/following{/other_user}","gists_url":"https://api.github.com/users/toddmotto/gists{/gist_id}","starred_url":"https://api.github.com/users/toddmotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddmotto/subscriptions","organizations_url":"https://api.github.com/users/toddmotto/orgs","repos_url":"https://api.github.com/users/toddmotto/repos","events_url":"https://api.github.com/users/toddmotto/events{/privacy}","received_events_url":"https://api.github.com/users/toddmotto/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T16:53:37Z","updated_at":"2016-09-01T16:53:37Z","body":"Good question indeed! If you can, use `bindings` as much as possible and think about stateless/stateful components. Using `require` kind of goes against the principles of pure components, and inheriting controllers isn't as easy to test, or as reliable IMO (due to DOM placement etc)."}}
{"actor":{"display_login":"toddmotto"}}