{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/11278","labels_url":"https://api.github.com/repos/angular/angular.js/issues/11278/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/11278/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/11278/events","html_url":"https://github.com/angular/angular.js/pull/11278","id":60335544,"number":11278,"title":"An example implementation of .directive `bind`","user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-09T12:23:19Z","updated_at":"2015-03-09T12:30:27Z","closed_at":"2015-03-09T12:25:50Z","pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/11278","html_url":"https://github.com/angular/angular.js/pull/11278","diff_url":"https://github.com/angular/angular.js/pull/11278.diff","patch_url":"https://github.com/angular/angular.js/pull/11278.patch"},"body":"Example implementation to implement #10007\r\n\r\nBased on [this comment](https://github.com/angular/angular.js/issues/10007#issuecomment-77763231) by @gautelo.\r\n\r\n**Note** This PR was created using the github editor and is expected to be more instructional than anything. Not expected to be merged."},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/77844665","html_url":"https://github.com/angular/angular.js/pull/11278#issuecomment-77844665","issue_url":"https://api.github.com/repos/angular/angular.js/issues/11278","id":77844665,"user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T12:30:27Z","updated_at":"2015-03-09T12:30:27Z","body":"Note, I closed the PR because this is not expected to be merged. Just wanted to provide an example. This PR would amount to an api like so:\r\n\r\n```javascript\r\nngModule.directive('myFoo', function() {\r\n  return {\r\n    bind: {\r\n      bar: '='\r\n    },\r\n    template: '<pre ng-bind=\"myFoo.bar | json\"></pre>'\r\n  };\r\n});\r\n```\r\n\r\nPros:\r\n\r\n - People don't have to learn a new method - simplifies learning curve... maybe\r\n - Very easily override default options (such as `controllerAs`)\r\n\r\nCons: \r\n\r\n - People don't have to learn a new method - Overloaded DDO is one of the most confusing parts of angular.\r\n\r\nVery interested to hear what others have to say about this."}}