{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/39828308","id":39828308,"diff_hunk":"@@ -719,8 +719,45 @@ export class DirectiveMetadata extends InjectableMetadata {\n    */\n   moduleId: string;\n \n+  // TODO: add an example after ContentChildren and ViewChildren are in master\n+  /**\n+   * Configures the queries that will be injected into the directive.\n+   *\n+   * Content queries are set before the `afterContentInit` callback is called.\n+   * View queries are set before the `afterViewInit` callback is called.\n+   *\n+   * ### Example\n+   *\n+   * ```\n+   * @Component({\n+   *   selector: 'someDir',\n+   *   queries: {\n+   *     contentChildren: new ContentChildren(ChildDirective),\n+   *     viewChildren: new ViewChildren(ChildDirective)","path":"modules/angular2/src/core/metadata/directives.ts","position":18,"original_position":18,"commit_id":"fc1b4103b7873f3dcffe127fbb7b02b1c3de10dc","original_commit_id":"3ac54f45450d7b02dba2c81a2b1ed8a5a4ccbc9e","user":{"login":"PascalPrecht","id":445106,"avatar_url":"https://avatars.githubusercontent.com/u/445106?v=3","gravatar_id":"","url":"https://api.github.com/users/PascalPrecht","html_url":"https://github.com/PascalPrecht","followers_url":"https://api.github.com/users/PascalPrecht/followers","following_url":"https://api.github.com/users/PascalPrecht/following{/other_user}","gists_url":"https://api.github.com/users/PascalPrecht/gists{/gist_id}","starred_url":"https://api.github.com/users/PascalPrecht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PascalPrecht/subscriptions","organizations_url":"https://api.github.com/users/PascalPrecht/orgs","repos_url":"https://api.github.com/users/PascalPrecht/repos","events_url":"https://api.github.com/users/PascalPrecht/events{/privacy}","received_events_url":"https://api.github.com/users/PascalPrecht/received_events","type":"User","site_admin":false},"body":"@vsavkin sorry, yea that's clear. Maybe I should rephrase my question.\r\n\r\n@rkirov I'm a tiny bit confused now. You say you're planning to remove \"constructor decorators\". Do you mean this:\r\n\r\n```\r\nclass SomeDir {\r\n   @ViewChildren(ItemDirective) viewChildren: QueryList<ItemDirective>; <-- I thought this is a property decorator\r\n}\r\n\r\nOr is that, because in TS you can omit the constructor entirely in these cases? \r\n\r\nBecause then, my understanding is, that `@Query` and `@ViewQuery` could have also been used like that (because those are also constructor decorators). Is that correct?\r\n\r\nAnd last question, what's the reasoning behind favouring `queries` property over constructor decorators? How do I request multiple types of children then? Or are `contentChildren` and `viewChildren` in this example simply property names for a query, so they could also be `foo` and `bar`?","created_at":"2015-09-18T06:51:20Z","updated_at":"2015-09-18T06:51:20Z","html_url":"https://github.com/angular/angular/pull/4237#discussion_r39828308","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/4237","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/39828308"},"html":{"href":"https://github.com/angular/angular/pull/4237#discussion_r39828308"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/4237"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/4237","id":45317306,"html_url":"https://github.com/angular/angular/pull/4237","diff_url":"https://github.com/angular/angular/pull/4237.diff","patch_url":"https://github.com/angular/angular/pull/4237.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/4237","number":4237,"state":"open","locked":false,"title":"feat(query): implement ContentChildren and ViewChildren","user":{"login":"vsavkin","id":35996,"avatar_url":"https://avatars.githubusercontent.com/u/35996?v=3","gravatar_id":"","url":"https://api.github.com/users/vsavkin","html_url":"https://github.com/vsavkin","followers_url":"https://api.github.com/users/vsavkin/followers","following_url":"https://api.github.com/users/vsavkin/following{/other_user}","gists_url":"https://api.github.com/users/vsavkin/gists{/gist_id}","starred_url":"https://api.github.com/users/vsavkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsavkin/subscriptions","organizations_url":"https://api.github.com/users/vsavkin/orgs","repos_url":"https://api.github.com/users/vsavkin/repos","events_url":"https://api.github.com/users/vsavkin/events{/privacy}","received_events_url":"https://api.github.com/users/vsavkin/received_events","type":"User","site_admin":false},"body":"@mhever @rkirov Could either of you review this guy?","created_at":"2015-09-17T17:21:06Z","updated_at":"2015-09-18T06:51:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4adb5344f93b4e212189c1cf49076d8831e2c1f","assignee":{"login":"rkirov","id":95713,"avatar_url":"https://avatars.githubusercontent.com/u/95713?v=3","gravatar_id":"","url":"https://api.github.com/users/rkirov","html_url":"https://github.com/rkirov","followers_url":"https://api.github.com/users/rkirov/followers","following_url":"https://api.github.com/users/rkirov/following{/other_user}","gists_url":"https://api.github.com/users/rkirov/gists{/gist_id}","starred_url":"https://api.github.com/users/rkirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkirov/subscriptions","organizations_url":"https://api.github.com/users/rkirov/orgs","repos_url":"https://api.github.com/users/rkirov/repos","events_url":"https://api.github.com/users/rkirov/events{/privacy}","received_events_url":"https://api.github.com/users/rkirov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular/pulls/4237/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/4237/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/4237/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/fc1b4103b7873f3dcffe127fbb7b02b1c3de10dc","head":{"label":"vsavkin:query_to_field","ref":"query_to_field","sha":"fc1b4103b7873f3dcffe127fbb7b02b1c3de10dc","user":{"login":"vsavkin","id":35996,"avatar_url":"https://avatars.githubusercontent.com/u/35996?v=3","gravatar_id":"","url":"https://api.github.com/users/vsavkin","html_url":"https://github.com/vsavkin","followers_url":"https://api.github.com/users/vsavkin/followers","following_url":"https://api.github.com/users/vsavkin/following{/other_user}","gists_url":"https://api.github.com/users/vsavkin/gists{/gist_id}","starred_url":"https://api.github.com/users/vsavkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsavkin/subscriptions","organizations_url":"https://api.github.com/users/vsavkin/orgs","repos_url":"https://api.github.com/users/vsavkin/repos","events_url":"https://api.github.com/users/vsavkin/events{/privacy}","received_events_url":"https://api.github.com/users/vsavkin/received_events","type":"User","site_admin":false},"repo":{"id":24644769,"name":"angular","full_name":"vsavkin/angular","owner":{"login":"vsavkin","id":35996,"avatar_url":"https://avatars.githubusercontent.com/u/35996?v=3","gravatar_id":"","url":"https://api.github.com/users/vsavkin","html_url":"https://github.com/vsavkin","followers_url":"https://api.github.com/users/vsavkin/followers","following_url":"https://api.github.com/users/vsavkin/following{/other_user}","gists_url":"https://api.github.com/users/vsavkin/gists{/gist_id}","starred_url":"https://api.github.com/users/vsavkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsavkin/subscriptions","organizations_url":"https://api.github.com/users/vsavkin/orgs","repos_url":"https://api.github.com/users/vsavkin/repos","events_url":"https://api.github.com/users/vsavkin/events{/privacy}","received_events_url":"https://api.github.com/users/vsavkin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vsavkin/angular","description":"","fork":true,"url":"https://api.github.com/repos/vsavkin/angular","forks_url":"https://api.github.com/repos/vsavkin/angular/forks","keys_url":"https://api.github.com/repos/vsavkin/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vsavkin/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vsavkin/angular/teams","hooks_url":"https://api.github.com/repos/vsavkin/angular/hooks","issue_events_url":"https://api.github.com/repos/vsavkin/angular/issues/events{/number}","events_url":"https://api.github.com/repos/vsavkin/angular/events","assignees_url":"https://api.github.com/repos/vsavkin/angular/assignees{/user}","branches_url":"https://api.github.com/repos/vsavkin/angular/branches{/branch}","tags_url":"https://api.github.com/repos/vsavkin/angular/tags","blobs_url":"https://api.github.com/repos/vsavkin/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vsavkin/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vsavkin/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/vsavkin/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vsavkin/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/vsavkin/angular/languages","stargazers_url":"https://api.github.com/repos/vsavkin/angular/stargazers","contributors_url":"https://api.github.com/repos/vsavkin/angular/contributors","subscribers_url":"https://api.github.com/repos/vsavkin/angular/subscribers","subscription_url":"https://api.github.com/repos/vsavkin/angular/subscription","commits_url":"https://api.github.com/repos/vsavkin/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/vsavkin/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/vsavkin/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/vsavkin/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/vsavkin/angular/contents/{+path}","compare_url":"https://api.github.com/repos/vsavkin/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vsavkin/angular/merges","archive_url":"https://api.github.com/repos/vsavkin/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vsavkin/angular/downloads","issues_url":"https://api.github.com/repos/vsavkin/angular/issues{/number}","pulls_url":"https://api.github.com/repos/vsavkin/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/vsavkin/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/vsavkin/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vsavkin/angular/labels{/name}","releases_url":"https://api.github.com/repos/vsavkin/angular/releases{/id}","created_at":"2014-09-30T15:59:47Z","updated_at":"2015-06-09T11:17:07Z","pushed_at":"2015-09-18T01:45:55Z","git_url":"git://github.com/vsavkin/angular.git","ssh_url":"git@github.com:vsavkin/angular.git","clone_url":"https://github.com/vsavkin/angular.git","svn_url":"https://github.com/vsavkin/angular","homepage":null,"size":17244,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"5a3ce879151fd3b09dd2c20307f087f4aae0aa21","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-09-18T06:42:12Z","pushed_at":"2015-09-18T01:46:08Z","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":52359,"stargazers_count":5379,"watchers_count":5379,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1467,"mirror_url":null,"open_issues_count":452,"forks":1467,"open_issues":452,"watchers":5379,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/4237"},"html":{"href":"https://github.com/angular/angular/pull/4237"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/4237"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/4237/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/4237/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/4237/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/fc1b4103b7873f3dcffe127fbb7b02b1c3de10dc"}}}}