{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/37363918","id":37363918,"diff_hunk":"@@ -0,0 +1,889 @@\n+'use strict';\n+\n+describe('ngOutlet', function () {\n+\n+  var elt,\n+      $compile,\n+      $rootScope,\n+      $router,\n+      $templateCache,\n+      $controllerProvider,\n+      $componentMapperProvider;\n+\n+  var OneController, TwoController, UserController;\n+\n+  function instructionFor(componentType) {\n+    return jasmine.objectContaining({componentType: componentType});\n+  }\n+\n+\n+  beforeEach(function () {\n+    module('ng');\n+    module('ngComponentRouter');\n+    module(function (_$controllerProvider_, _$componentMapperProvider_) {\n+      $controllerProvider = _$controllerProvider_;\n+      $componentMapperProvider = _$componentMapperProvider_;\n+    });\n+\n+    inject(function (_$compile_, _$rootScope_, _$router_, _$templateCache_) {\n+      $compile = _$compile_;\n+      $rootScope = _$rootScope_;\n+      $router = _$router_;\n+      $templateCache = _$templateCache_;\n+    });\n+\n+    UserController = registerComponent('user', '<div>hello {{user.name}}</div>', function ($routeParams) {\n+      this.name = $routeParams.name;\n+    });\n+    OneController = registerComponent('one', '<div>{{one.number}}</div>', boringController('number', 'one'));\n+    TwoController = registerComponent('two', '<div>{{two.number}}</div>', boringController('number', 'two'));\n+  });\n+\n+\n+  it('should work in a simple case', function () {\n+    compile('<ng-outlet></ng-outlet>');\n+\n+    $router.config([\n+      { path: '/', component: OneController }\n+    ]);\n+\n+    $router.navigate('/');\n+    $rootScope.$digest();\n+\n+    expect(elt.text()).toBe('one');\n+  });\n+\n+\n+  // See https://github.com/angular/router/issues/105\n+  xit('should warn when instantiating a component with no controller', function () {\n+    put('noController', '<div>{{ 2 + 2 }}</div>');\n+    $router.config([\n+      { path: '/', component: 'noController' }\n+    ]);\n+\n+    spyOn(console, 'warn');\n+    compile('<ng-outlet></ng-outlet>');\n+    $router.navigate('/');\n+\n+    expect(console.warn).toHaveBeenCalledWith('Could not find controller for', 'NoControllerController');\n+    expect(elt.text()).toBe('4');\n+  });\n+\n+\n+  it('should navigate between components with different parameters', function () {\n+    $router.config([\n+      { path: '/user/:name', component: UserController }\n+    ]);\n+    compile('<ng-outlet></ng-outlet>');\n+\n+    $router.navigate('/user/brian');\n+    $rootScope.$digest();\n+    expect(elt.text()).toBe('hello brian');\n+\n+    $router.navigate('/user/igor');\n+    $rootScope.$digest();\n+    expect(elt.text()).toBe('hello igor');\n+  });\n+\n+\n+  //TODO: fix this\n+  xit('should not reactivate a parent when navigating between child components with different parameters', function () {\n+    var spy = jasmine.createSpy('activate');\n+    function ParentController() {}\n+    ParentController.$routeConfig = [\n+      { path: '/user/:name', component: UserController }\n+    ];\n+    ParentController.prototype.activate = spy;\n+\n+    registerComponent('parent', 'parent { <ng-outlet></ng-outlet> }', ParentController);\n+\n+    $router.config([\n+      { path: '/parent', component: ParentController }\n+    ]);\n+    compile('<ng-outlet></ng-outlet>');\n+\n+    $router.navigate('/parent/user/brian');\n+    $rootScope.$digest();\n+    expect(spy).toHaveBeenCalled();\n+    expect(elt.text()).toBe('parent { hello brian }');\n+\n+    spy.calls.reset();\n+\n+    $router.navigate('/parent/user/igor');\n+    $rootScope.$digest();\n+    expect(spy).not.toHaveBeenCalled();\n+    expect(elt.text()).toBe('parent { hello igor }');\n+  });\n+\n+\n+  // it('should work with multiple named outlets', function () {","path":"modules/angular1_router/test/ng_outlet_spec.js","position":119,"original_position":119,"commit_id":"aa05af5d3f1ddcc79626640bb8e2e10eba29f705","original_commit_id":"aa05af5d3f1ddcc79626640bb8e2e10eba29f705","user":{"login":"btford","id":474988,"avatar_url":"https://avatars.githubusercontent.com/u/474988?v=3","gravatar_id":"","url":"https://api.github.com/users/btford","html_url":"https://github.com/btford","followers_url":"https://api.github.com/users/btford/followers","following_url":"https://api.github.com/users/btford/following{/other_user}","gists_url":"https://api.github.com/users/btford/gists{/gist_id}","starred_url":"https://api.github.com/users/btford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btford/subscriptions","organizations_url":"https://api.github.com/users/btford/orgs","repos_url":"https://api.github.com/users/btford/repos","events_url":"https://api.github.com/users/btford/events{/privacy}","received_events_url":"https://api.github.com/users/btford/received_events","type":"User","site_admin":false},"body":":+1: This should be removed and re-implemented.","created_at":"2015-08-18T22:58:12Z","updated_at":"2015-08-18T22:58:12Z","html_url":"https://github.com/angular/angular/pull/3698#discussion_r37363918","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/3698","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/37363918"},"html":{"href":"https://github.com/angular/angular/pull/3698#discussion_r37363918"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/3698"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/3698","id":42739851,"html_url":"https://github.com/angular/angular/pull/3698","diff_url":"https://github.com/angular/angular/pull/3698.diff","patch_url":"https://github.com/angular/angular/pull/3698.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/3698","number":3698,"state":"open","locked":false,"title":"feat(router): angular1 router","user":{"login":"btford","id":474988,"avatar_url":"https://avatars.githubusercontent.com/u/474988?v=3","gravatar_id":"","url":"https://api.github.com/users/btford","html_url":"https://github.com/btford","followers_url":"https://api.github.com/users/btford/followers","following_url":"https://api.github.com/users/btford/following{/other_user}","gists_url":"https://api.github.com/users/btford/gists{/gist_id}","starred_url":"https://api.github.com/users/btford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btford/subscriptions","organizations_url":"https://api.github.com/users/btford/orgs","repos_url":"https://api.github.com/users/btford/repos","events_url":"https://api.github.com/users/btford/events{/privacy}","received_events_url":"https://api.github.com/users/btford/received_events","type":"User","site_admin":false},"body":"Supersedes #3138\r\n\r\nI did a bit of cleanup on @shahata's PR. I'm going to let CI for this run, and push it to presubmit if it passes.\r\n\r\n@IgorMinar is going to review this, but we should get this in before it gets bitrotten again.","created_at":"2015-08-18T19:42:12Z","updated_at":"2015-08-18T22:58:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bebb88613e9833b37a2e7d83749711fc96586a46","assignee":{"login":"IgorMinar","id":216296,"avatar_url":"https://avatars.githubusercontent.com/u/216296?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/angular/milestones/44","html_url":"https://github.com/angular/angular/milestones/alpha-36","labels_url":"https://api.github.com/repos/angular/angular/milestones/44/labels","id":1234341,"number":44,"title":"alpha-36","description":"Future milestone. Work on all issues to complete by Wednesday August 26 @ 8am PT; sync internal/external by August 27 EOD.","creator":{"login":"naomiblack","id":2286589,"avatar_url":"https://avatars.githubusercontent.com/u/2286589?v=3","gravatar_id":"","url":"https://api.github.com/users/naomiblack","html_url":"https://github.com/naomiblack","followers_url":"https://api.github.com/users/naomiblack/followers","following_url":"https://api.github.com/users/naomiblack/following{/other_user}","gists_url":"https://api.github.com/users/naomiblack/gists{/gist_id}","starred_url":"https://api.github.com/users/naomiblack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naomiblack/subscriptions","organizations_url":"https://api.github.com/users/naomiblack/orgs","repos_url":"https://api.github.com/users/naomiblack/repos","events_url":"https://api.github.com/users/naomiblack/events{/privacy}","received_events_url":"https://api.github.com/users/naomiblack/received_events","type":"User","site_admin":false},"open_issues":44,"closed_issues":17,"state":"open","created_at":"2015-07-30T23:01:19Z","updated_at":"2015-08-18T22:42:47Z","due_on":"2015-08-26T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/angular/angular/pulls/3698/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/3698/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/3698/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/aa05af5d3f1ddcc79626640bb8e2e10eba29f705","head":{"label":"btford:shahata-btford-feat-angular1-router","ref":"shahata-btford-feat-angular1-router","sha":"aa05af5d3f1ddcc79626640bb8e2e10eba29f705","user":{"login":"btford","id":474988,"avatar_url":"https://avatars.githubusercontent.com/u/474988?v=3","gravatar_id":"","url":"https://api.github.com/users/btford","html_url":"https://github.com/btford","followers_url":"https://api.github.com/users/btford/followers","following_url":"https://api.github.com/users/btford/following{/other_user}","gists_url":"https://api.github.com/users/btford/gists{/gist_id}","starred_url":"https://api.github.com/users/btford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btford/subscriptions","organizations_url":"https://api.github.com/users/btford/orgs","repos_url":"https://api.github.com/users/btford/repos","events_url":"https://api.github.com/users/btford/events{/privacy}","received_events_url":"https://api.github.com/users/btford/received_events","type":"User","site_admin":false},"repo":{"id":28889554,"name":"angular","full_name":"btford/angular","owner":{"login":"btford","id":474988,"avatar_url":"https://avatars.githubusercontent.com/u/474988?v=3","gravatar_id":"","url":"https://api.github.com/users/btford","html_url":"https://github.com/btford","followers_url":"https://api.github.com/users/btford/followers","following_url":"https://api.github.com/users/btford/following{/other_user}","gists_url":"https://api.github.com/users/btford/gists{/gist_id}","starred_url":"https://api.github.com/users/btford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btford/subscriptions","organizations_url":"https://api.github.com/users/btford/orgs","repos_url":"https://api.github.com/users/btford/repos","events_url":"https://api.github.com/users/btford/events{/privacy}","received_events_url":"https://api.github.com/users/btford/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/btford/angular","description":"","fork":true,"url":"https://api.github.com/repos/btford/angular","forks_url":"https://api.github.com/repos/btford/angular/forks","keys_url":"https://api.github.com/repos/btford/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/btford/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/btford/angular/teams","hooks_url":"https://api.github.com/repos/btford/angular/hooks","issue_events_url":"https://api.github.com/repos/btford/angular/issues/events{/number}","events_url":"https://api.github.com/repos/btford/angular/events","assignees_url":"https://api.github.com/repos/btford/angular/assignees{/user}","branches_url":"https://api.github.com/repos/btford/angular/branches{/branch}","tags_url":"https://api.github.com/repos/btford/angular/tags","blobs_url":"https://api.github.com/repos/btford/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/btford/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/btford/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/btford/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/btford/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/btford/angular/languages","stargazers_url":"https://api.github.com/repos/btford/angular/stargazers","contributors_url":"https://api.github.com/repos/btford/angular/contributors","subscribers_url":"https://api.github.com/repos/btford/angular/subscribers","subscription_url":"https://api.github.com/repos/btford/angular/subscription","commits_url":"https://api.github.com/repos/btford/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/btford/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/btford/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/btford/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/btford/angular/contents/{+path}","compare_url":"https://api.github.com/repos/btford/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/btford/angular/merges","archive_url":"https://api.github.com/repos/btford/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/btford/angular/downloads","issues_url":"https://api.github.com/repos/btford/angular/issues{/number}","pulls_url":"https://api.github.com/repos/btford/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/btford/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/btford/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/btford/angular/labels{/name}","releases_url":"https://api.github.com/repos/btford/angular/releases{/id}","created_at":"2015-01-07T00:00:47Z","updated_at":"2015-01-07T00:00:48Z","pushed_at":"2015-08-18T22:28:15Z","git_url":"git://github.com/btford/angular.git","ssh_url":"git@github.com:btford/angular.git","clone_url":"https://github.com/btford/angular.git","svn_url":"https://github.com/btford/angular","homepage":null,"size":12578,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"235dec26fc583c939f983da1c1451c5d6cd8c3b3","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":24195339,"name":"angular","full_name":"angular/angular","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","description":"","fork":false,"url":"https://api.github.com/repos/angular/angular","forks_url":"https://api.github.com/repos/angular/angular/forks","keys_url":"https://api.github.com/repos/angular/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular/teams","hooks_url":"https://api.github.com/repos/angular/angular/hooks","issue_events_url":"https://api.github.com/repos/angular/angular/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular/events","assignees_url":"https://api.github.com/repos/angular/angular/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular/tags","blobs_url":"https://api.github.com/repos/angular/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular/languages","stargazers_url":"https://api.github.com/repos/angular/angular/stargazers","contributors_url":"https://api.github.com/repos/angular/angular/contributors","subscribers_url":"https://api.github.com/repos/angular/angular/subscribers","subscription_url":"https://api.github.com/repos/angular/angular/subscription","commits_url":"https://api.github.com/repos/angular/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular/merges","archive_url":"https://api.github.com/repos/angular/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular/downloads","issues_url":"https://api.github.com/repos/angular/angular/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular/releases{/id}","created_at":"2014-09-18T16:12:01Z","updated_at":"2015-08-18T21:13:10Z","pushed_at":"2015-08-18T22:56:24Z","git_url":"git://github.com/angular/angular.git","ssh_url":"git@github.com:angular/angular.git","clone_url":"https://github.com/angular/angular.git","svn_url":"https://github.com/angular/angular","homepage":"https://angular.io","size":40955,"stargazers_count":4809,"watchers_count":4809,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1264,"mirror_url":null,"open_issues_count":467,"forks":1264,"open_issues":467,"watchers":4809,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/3698"},"html":{"href":"https://github.com/angular/angular/pull/3698"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/3698"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/3698/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/3698/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/3698/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/aa05af5d3f1ddcc79626640bb8e2e10eba29f705"}}}}