{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.js/pulls/comments/49848054","id":49848054,"diff_hunk":"@@ -5307,6 +5338,195 @@ describe('$compile', function() {\n       });\n     });\n \n+    it('should bind the required controllers to the directive controller, if provided as an object and bindToController is truthy', function() {\n+      var parentController, siblingController;\n+\n+      function ParentController() { this.name = 'Parent'; }\n+      function SiblingController() { this.name = 'Sibling'; }\n+      function MeController() { this.name = 'Me'; }\n+      MeController.prototype.$onInit = function() {\n+        parentController = this.container;\n+        siblingController = this.friend;\n+      };\n+      spyOn(MeController.prototype, '$onInit').andCallThrough();\n+\n+      angular.module('my', [])\n+        .directive('me', function() {\n+          return {\n+            restrict: 'E',\n+            scope: {},\n+            controllerAs: '$ctrl',\n+            require: { container: '^parent', friend: 'sibling' },\n+            bindToController: true,\n+            controller: MeController,\n+            controllerAs: '$ctrl'\n+          };\n+        })\n+        .directive('parent', function() {\n+          return {\n+            restrict: 'E',\n+            scope: {},\n+            controller: ParentController\n+          };\n+        })\n+        .directive('sibling', function() {\n+          return {\n+            controller: SiblingController\n+          };\n+        });\n+\n+      module('my');\n+      inject(function($compile, $rootScope, meDirective) {\n+        element = $compile('<parent><me sibling></me></parent>')($rootScope);\n+        expect(MeController.prototype.$onInit).toHaveBeenCalled();\n+        expect(parentController).toEqual(jasmine.any(ParentController));\n+        expect(siblingController).toEqual(jasmine.any(SiblingController));\n+      });\n+    });\n+\n+\n+    it('should not bind required controllers bindToController is falsy', function() {","path":"test/ng/compileSpec.js","position":144,"original_position":145,"commit_id":"cae40cabd6dc26a381261b39944f3a21c8cb0180","original_commit_id":"98dc205d9a729740a5cf4b779c8d6bb380eaa98f","user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2016-01-15T12:22:58Z","updated_at":"2016-01-15T12:22:58Z","html_url":"https://github.com/angular/angular.js/pull/13763#discussion_r49848054","pull_request_url":"https://api.github.com/repos/angular/angular.js/pulls/13763","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/49848054"},"html":{"href":"https://github.com/angular/angular.js/pull/13763#discussion_r49848054"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.js/pulls/13763"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/13763","id":55930701,"html_url":"https://github.com/angular/angular.js/pull/13763","diff_url":"https://github.com/angular/angular.js/pull/13763.diff","patch_url":"https://github.com/angular/angular.js/pull/13763.patch","issue_url":"https://api.github.com/repos/angular/angular.js/issues/13763","number":13763,"state":"open","locked":false,"title":"`$onInit` and friends","user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-13T17:43:20Z","updated_at":"2016-01-15T12:22:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f47a406db529a9f11dcfcd59070cefe01b0e1ba","assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/90","html_url":"https://github.com/angular/angular.js/milestones/1.5.x%20-%20migration-facilitation","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/90/labels","id":1025270,"number":90,"title":"1.5.x - migration-facilitation","description":"","creator":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"open_issues":75,"closed_issues":58,"state":"open","created_at":"2015-03-17T12:15:49Z","updated_at":"2016-01-15T10:00:35Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/angular/angular.js/pulls/13763/commits","review_comments_url":"https://api.github.com/repos/angular/angular.js/pulls/13763/comments","review_comment_url":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/13763/comments","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/cae40cabd6dc26a381261b39944f3a21c8cb0180","head":{"label":"petebacondarwin:onInit","ref":"onInit","sha":"cae40cabd6dc26a381261b39944f3a21c8cb0180","user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"repo":{"id":6367749,"name":"angular.js","full_name":"petebacondarwin/angular.js","owner":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petebacondarwin/angular.js","description":"","fork":true,"url":"https://api.github.com/repos/petebacondarwin/angular.js","forks_url":"https://api.github.com/repos/petebacondarwin/angular.js/forks","keys_url":"https://api.github.com/repos/petebacondarwin/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petebacondarwin/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petebacondarwin/angular.js/teams","hooks_url":"https://api.github.com/repos/petebacondarwin/angular.js/hooks","issue_events_url":"https://api.github.com/repos/petebacondarwin/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/petebacondarwin/angular.js/events","assignees_url":"https://api.github.com/repos/petebacondarwin/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/petebacondarwin/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/petebacondarwin/angular.js/tags","blobs_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petebacondarwin/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/petebacondarwin/angular.js/languages","stargazers_url":"https://api.github.com/repos/petebacondarwin/angular.js/stargazers","contributors_url":"https://api.github.com/repos/petebacondarwin/angular.js/contributors","subscribers_url":"https://api.github.com/repos/petebacondarwin/angular.js/subscribers","subscription_url":"https://api.github.com/repos/petebacondarwin/angular.js/subscription","commits_url":"https://api.github.com/repos/petebacondarwin/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/petebacondarwin/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/petebacondarwin/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/petebacondarwin/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/petebacondarwin/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petebacondarwin/angular.js/merges","archive_url":"https://api.github.com/repos/petebacondarwin/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petebacondarwin/angular.js/downloads","issues_url":"https://api.github.com/repos/petebacondarwin/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/petebacondarwin/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/petebacondarwin/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/petebacondarwin/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petebacondarwin/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/petebacondarwin/angular.js/releases{/id}","created_at":"2012-10-24T09:47:23Z","updated_at":"2015-05-19T08:10:36Z","pushed_at":"2016-01-15T11:54:06Z","git_url":"git://github.com/petebacondarwin/angular.js.git","ssh_url":"git@github.com:petebacondarwin/angular.js.git","clone_url":"https://github.com/petebacondarwin/angular.js.git","svn_url":"https://github.com/petebacondarwin/angular.js","homepage":"http://angularjs.org","size":81359,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"13587193a56b57c2f165666d9d5e62bfe4f9152a","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":460078,"name":"angular.js","full_name":"angular/angular.js","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular.js","description":"HTML enhanced for web apps","fork":false,"url":"https://api.github.com/repos/angular/angular.js","forks_url":"https://api.github.com/repos/angular/angular.js/forks","keys_url":"https://api.github.com/repos/angular/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular.js/teams","hooks_url":"https://api.github.com/repos/angular/angular.js/hooks","issue_events_url":"https://api.github.com/repos/angular/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular.js/events","assignees_url":"https://api.github.com/repos/angular/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular.js/tags","blobs_url":"https://api.github.com/repos/angular/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular.js/languages","stargazers_url":"https://api.github.com/repos/angular/angular.js/stargazers","contributors_url":"https://api.github.com/repos/angular/angular.js/contributors","subscribers_url":"https://api.github.com/repos/angular/angular.js/subscribers","subscription_url":"https://api.github.com/repos/angular/angular.js/subscription","commits_url":"https://api.github.com/repos/angular/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular.js/merges","archive_url":"https://api.github.com/repos/angular/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular.js/downloads","issues_url":"https://api.github.com/repos/angular/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular.js/releases{/id}","created_at":"2010-01-06T00:34:37Z","updated_at":"2016-01-15T11:07:27Z","pushed_at":"2016-01-15T11:54:22Z","git_url":"git://github.com/angular/angular.js.git","ssh_url":"git@github.com:angular/angular.js.git","clone_url":"https://github.com/angular/angular.js.git","svn_url":"https://github.com/angular/angular.js","homepage":"http://angularjs.org","size":141380,"stargazers_count":46057,"watchers_count":46057,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21325,"mirror_url":null,"open_issues_count":1279,"forks":21325,"open_issues":1279,"watchers":46057,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/13763"},"html":{"href":"https://github.com/angular/angular.js/pull/13763"},"issue":{"href":"https://api.github.com/repos/angular/angular.js/issues/13763"},"comments":{"href":"https://api.github.com/repos/angular/angular.js/issues/13763/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.js/pulls/13763/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular.js/pulls/13763/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.js/statuses/cae40cabd6dc26a381261b39944f3a21c8cb0180"}}}}