{"action":"created","comment":{"url":"https://api.github.com/repos/angular/material2/pulls/comments/155676642","pull_request_review_id":81717630,"id":155676642,"diff_hunk":"@@ -0,0 +1,56 @@\n+/**\n+ * @license\n+ * Copyright Google LLC All Rights Reserved.\n+ *\n+ * Use of this source code is governed by an MIT-style license that can be\n+ * found in the LICENSE file at https://angular.io/license\n+ */\n+\n+import {Component} from '@angular/core';\n+import {FlatTreeControl, NestedTreeControl} from '@angular/cdk/tree';\n+import {of as ofObservable} from 'rxjs/observable/of';\n+\n+import {JsonNode, JsonDatabase} from './json-database';\n+import {FlatDataSource, JsonFlatNode} from './flat-data-source';\n+import {JsonNestedDataSource} from './nested-data-source';\n+\n+\n+@Component({\n+  moduleId: module.id,\n+  selector: 'tree-demo',\n+  templateUrl: 'tree-demo.html',\n+  styleUrls: ['tree-demo.css'],\n+})\n+export class TreeDemo {\n+  // Flat tree control\n+  treeControl: FlatTreeControl<JsonFlatNode>;\n+\n+  // Nested tree control\n+  nestedTreeControl: NestedTreeControl<JsonNode>;\n+\n+  // Flat tree data source\n+  dataSource: FlatDataSource;\n+\n+  // Nested tree data source\n+  nestedDataSource: JsonNestedDataSource;\n+\n+  constructor(database: JsonDatabase) {\n+    // For flat tree\n+    this.treeControl = new FlatTreeControl<JsonFlatNode>(this.getLevel, this.isExpandable);","path":"src/demo-app/tree/tree-demo.ts","position":39,"original_position":39,"commit_id":"7b0ae8354c301b36f1acbfcdbab48426ae6d9b88","original_commit_id":"7b0ae8354c301b36f1acbfcdbab48426ae6d9b88","user":{"login":"jelbourn","id":838736,"avatar_url":"https://avatars3.githubusercontent.com/u/838736?v=4","gravatar_id":"","url":"https://api.github.com/users/jelbourn","html_url":"https://github.com/jelbourn","followers_url":"https://api.github.com/users/jelbourn/followers","following_url":"https://api.github.com/users/jelbourn/following{/other_user}","gists_url":"https://api.github.com/users/jelbourn/gists{/gist_id}","starred_url":"https://api.github.com/users/jelbourn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelbourn/subscriptions","organizations_url":"https://api.github.com/users/jelbourn/orgs","repos_url":"https://api.github.com/users/jelbourn/repos","events_url":"https://api.github.com/users/jelbourn/events{/privacy}","received_events_url":"https://api.github.com/users/jelbourn/received_events","type":"User","site_admin":false},"body":"Would it make sense to use a more real-world example, such as collection of directories?","created_at":"2017-12-08T00:13:11Z","updated_at":"2017-12-08T00:25:45Z","html_url":"https://github.com/angular/material2/pull/8749#discussion_r155676642","pull_request_url":"https://api.github.com/repos/angular/material2/pulls/8749","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/angular/material2/pulls/comments/155676642"},"html":{"href":"https://github.com/angular/material2/pull/8749#discussion_r155676642"},"pull_request":{"href":"https://api.github.com/repos/angular/material2/pulls/8749"}}},"pull_request":{"url":"https://api.github.com/repos/angular/material2/pulls/8749","id":155726637,"html_url":"https://github.com/angular/material2/pull/8749","diff_url":"https://github.com/angular/material2/pull/8749.diff","patch_url":"https://github.com/angular/material2/pull/8749.patch","issue_url":"https://api.github.com/repos/angular/material2/issues/8749","number":8749,"state":"open","locked":false,"title":"feat(tree): add tree demo page","user":{"login":"tinayuangao","id":20677343,"avatar_url":"https://avatars3.githubusercontent.com/u/20677343?v=4","gravatar_id":"","url":"https://api.github.com/users/tinayuangao","html_url":"https://github.com/tinayuangao","followers_url":"https://api.github.com/users/tinayuangao/followers","following_url":"https://api.github.com/users/tinayuangao/following{/other_user}","gists_url":"https://api.github.com/users/tinayuangao/gists{/gist_id}","starred_url":"https://api.github.com/users/tinayuangao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinayuangao/subscriptions","organizations_url":"https://api.github.com/users/tinayuangao/orgs","repos_url":"https://api.github.com/users/tinayuangao/repos","events_url":"https://api.github.com/users/tinayuangao/events{/privacy}","received_events_url":"https://api.github.com/users/tinayuangao/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-30T21:42:35Z","updated_at":"2017-12-08T00:25:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"151e079e9431368d45466ff53f681889e7f2b3f6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"andrewseguin","id":22898577,"avatar_url":"https://avatars3.githubusercontent.com/u/22898577?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewseguin","html_url":"https://github.com/andrewseguin","followers_url":"https://api.github.com/users/andrewseguin/followers","following_url":"https://api.github.com/users/andrewseguin/following{/other_user}","gists_url":"https://api.github.com/users/andrewseguin/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewseguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewseguin/subscriptions","organizations_url":"https://api.github.com/users/andrewseguin/orgs","repos_url":"https://api.github.com/users/andrewseguin/repos","events_url":"https://api.github.com/users/andrewseguin/events{/privacy}","received_events_url":"https://api.github.com/users/andrewseguin/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/angular/material2/pulls/8749/commits","review_comments_url":"https://api.github.com/repos/angular/material2/pulls/8749/comments","review_comment_url":"https://api.github.com/repos/angular/material2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/material2/issues/8749/comments","statuses_url":"https://api.github.com/repos/angular/material2/statuses/7b0ae8354c301b36f1acbfcdbab48426ae6d9b88","head":{"label":"tinayuangao:mat-tree-demo","ref":"mat-tree-demo","sha":"7b0ae8354c301b36f1acbfcdbab48426ae6d9b88","user":{"login":"tinayuangao","id":20677343,"avatar_url":"https://avatars3.githubusercontent.com/u/20677343?v=4","gravatar_id":"","url":"https://api.github.com/users/tinayuangao","html_url":"https://github.com/tinayuangao","followers_url":"https://api.github.com/users/tinayuangao/followers","following_url":"https://api.github.com/users/tinayuangao/following{/other_user}","gists_url":"https://api.github.com/users/tinayuangao/gists{/gist_id}","starred_url":"https://api.github.com/users/tinayuangao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinayuangao/subscriptions","organizations_url":"https://api.github.com/users/tinayuangao/orgs","repos_url":"https://api.github.com/users/tinayuangao/repos","events_url":"https://api.github.com/users/tinayuangao/events{/privacy}","received_events_url":"https://api.github.com/users/tinayuangao/received_events","type":"User","site_admin":false},"repo":{"id":69630794,"name":"material2","full_name":"tinayuangao/material2","owner":{"login":"tinayuangao","id":20677343,"avatar_url":"https://avatars3.githubusercontent.com/u/20677343?v=4","gravatar_id":"","url":"https://api.github.com/users/tinayuangao","html_url":"https://github.com/tinayuangao","followers_url":"https://api.github.com/users/tinayuangao/followers","following_url":"https://api.github.com/users/tinayuangao/following{/other_user}","gists_url":"https://api.github.com/users/tinayuangao/gists{/gist_id}","starred_url":"https://api.github.com/users/tinayuangao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinayuangao/subscriptions","organizations_url":"https://api.github.com/users/tinayuangao/orgs","repos_url":"https://api.github.com/users/tinayuangao/repos","events_url":"https://api.github.com/users/tinayuangao/events{/privacy}","received_events_url":"https://api.github.com/users/tinayuangao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tinayuangao/material2","description":"Material Design components for Angular 2","fork":true,"url":"https://api.github.com/repos/tinayuangao/material2","forks_url":"https://api.github.com/repos/tinayuangao/material2/forks","keys_url":"https://api.github.com/repos/tinayuangao/material2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tinayuangao/material2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tinayuangao/material2/teams","hooks_url":"https://api.github.com/repos/tinayuangao/material2/hooks","issue_events_url":"https://api.github.com/repos/tinayuangao/material2/issues/events{/number}","events_url":"https://api.github.com/repos/tinayuangao/material2/events","assignees_url":"https://api.github.com/repos/tinayuangao/material2/assignees{/user}","branches_url":"https://api.github.com/repos/tinayuangao/material2/branches{/branch}","tags_url":"https://api.github.com/repos/tinayuangao/material2/tags","blobs_url":"https://api.github.com/repos/tinayuangao/material2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tinayuangao/material2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tinayuangao/material2/git/refs{/sha}","trees_url":"https://api.github.com/repos/tinayuangao/material2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tinayuangao/material2/statuses/{sha}","languages_url":"https://api.github.com/repos/tinayuangao/material2/languages","stargazers_url":"https://api.github.com/repos/tinayuangao/material2/stargazers","contributors_url":"https://api.github.com/repos/tinayuangao/material2/contributors","subscribers_url":"https://api.github.com/repos/tinayuangao/material2/subscribers","subscription_url":"https://api.github.com/repos/tinayuangao/material2/subscription","commits_url":"https://api.github.com/repos/tinayuangao/material2/commits{/sha}","git_commits_url":"https://api.github.com/repos/tinayuangao/material2/git/commits{/sha}","comments_url":"https://api.github.com/repos/tinayuangao/material2/comments{/number}","issue_comment_url":"https://api.github.com/repos/tinayuangao/material2/issues/comments{/number}","contents_url":"https://api.github.com/repos/tinayuangao/material2/contents/{+path}","compare_url":"https://api.github.com/repos/tinayuangao/material2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tinayuangao/material2/merges","archive_url":"https://api.github.com/repos/tinayuangao/material2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tinayuangao/material2/downloads","issues_url":"https://api.github.com/repos/tinayuangao/material2/issues{/number}","pulls_url":"https://api.github.com/repos/tinayuangao/material2/pulls{/number}","milestones_url":"https://api.github.com/repos/tinayuangao/material2/milestones{/number}","notifications_url":"https://api.github.com/repos/tinayuangao/material2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tinayuangao/material2/labels{/name}","releases_url":"https://api.github.com/repos/tinayuangao/material2/releases{/id}","deployments_url":"https://api.github.com/repos/tinayuangao/material2/deployments","created_at":"2016-09-30T03:34:11Z","updated_at":"2017-09-12T16:12:28Z","pushed_at":"2017-12-07T21:50:11Z","git_url":"git://github.com/tinayuangao/material2.git","ssh_url":"git@github.com:tinayuangao/material2.git","clone_url":"https://github.com/tinayuangao/material2.git","svn_url":"https://github.com/tinayuangao/material2","homepage":"https://material.angular.io/","size":10955,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"angular:tree","ref":"tree","sha":"8bf44e4e9b77b47f49712ac3796f81921059a583","user":{"login":"angular","id":139426,"avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","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":49016322,"name":"material2","full_name":"angular/material2","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","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/material2","description":"Material Design components for Angular","fork":false,"url":"https://api.github.com/repos/angular/material2","forks_url":"https://api.github.com/repos/angular/material2/forks","keys_url":"https://api.github.com/repos/angular/material2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/material2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/material2/teams","hooks_url":"https://api.github.com/repos/angular/material2/hooks","issue_events_url":"https://api.github.com/repos/angular/material2/issues/events{/number}","events_url":"https://api.github.com/repos/angular/material2/events","assignees_url":"https://api.github.com/repos/angular/material2/assignees{/user}","branches_url":"https://api.github.com/repos/angular/material2/branches{/branch}","tags_url":"https://api.github.com/repos/angular/material2/tags","blobs_url":"https://api.github.com/repos/angular/material2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/material2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/material2/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/material2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/material2/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/material2/languages","stargazers_url":"https://api.github.com/repos/angular/material2/stargazers","contributors_url":"https://api.github.com/repos/angular/material2/contributors","subscribers_url":"https://api.github.com/repos/angular/material2/subscribers","subscription_url":"https://api.github.com/repos/angular/material2/subscription","commits_url":"https://api.github.com/repos/angular/material2/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/material2/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/material2/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/material2/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/material2/contents/{+path}","compare_url":"https://api.github.com/repos/angular/material2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/material2/merges","archive_url":"https://api.github.com/repos/angular/material2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/material2/downloads","issues_url":"https://api.github.com/repos/angular/material2/issues{/number}","pulls_url":"https://api.github.com/repos/angular/material2/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/material2/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/material2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/material2/labels{/name}","releases_url":"https://api.github.com/repos/angular/material2/releases{/id}","deployments_url":"https://api.github.com/repos/angular/material2/deployments","created_at":"2016-01-04T18:50:02Z","updated_at":"2017-12-08T00:15:24Z","pushed_at":"2017-12-08T00:24:45Z","git_url":"git://github.com/angular/material2.git","ssh_url":"git@github.com:angular/material2.git","clone_url":"https://github.com/angular/material2.git","svn_url":"https://github.com/angular/material2","homepage":"https://material.angular.io","size":10790,"stargazers_count":12203,"watchers_count":12203,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2910,"mirror_url":null,"archived":false,"open_issues_count":882,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2910,"open_issues":882,"watchers":12203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/material2/pulls/8749"},"html":{"href":"https://github.com/angular/material2/pull/8749"},"issue":{"href":"https://api.github.com/repos/angular/material2/issues/8749"},"comments":{"href":"https://api.github.com/repos/angular/material2/issues/8749/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/material2/pulls/8749/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/material2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/material2/pulls/8749/commits"},"statuses":{"href":"https://api.github.com/repos/angular/material2/statuses/7b0ae8354c301b36f1acbfcdbab48426ae6d9b88"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jelbourn"}}