{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/40820691","id":40820691,"diff_hunk":"@@ -30,156 +36,390 @@ export var LIFECYCLE_HOOKS_VALUES = [\n  * - `DoCheck`,\n  * - `AfterContentInit`,\n  * - `AfterContentChecked`,\n+ * - `AfterViewInit`,\n+ * - `AfterViewChecked`,\n  * - `OnDestroy` (at the very end before destruction)\n  */\n \n /**\n- * Notify a directive when any of its bindings have changed.\n+ * Implement this interface to get notified when any data-bound property of the directive changes.\n  *\n- * `onChanges` is called right after the directive's bindings have been checked,\n- * and before any of its children's bindings have been checked.\n+ * `onChanges` is called right after the data-bound properties have been checked and before view\n+ * and content children are checked.\n  *\n- * It is invoked only if at least one of the directive's bindings has changed.\n+ * It is invoked after all the directive's data-bound properties have been updated if at least one\n+ * of them has changed.\n  *\n- * ## Example:\n+ * ### Example ([live example](http://plnkr.co/edit/AHrB6opLqHDBPkt4KpdT?p=preview)):\n  *\n- * ```\n- * @Component(...)\n+ * ```typescript\n+ * @Component({selector: 'my-cmp'})\n+ * @View({template: `<p>prop = {{prop}}</p>`})\n  * class MyComponent implements OnChanges {\n- *   propA;\n- *   propB;\n+ *   @Property() prop: any;\n  *\n- *   onChanges(changes: {[idx: string, PropertyUpdate]}): void {\n- *     // This will get called after any of the properties have been updated.\n- *     if (changes['propA']) {\n- *       // if propA was updated\n- *     }\n- *     if (changes['propA']) {\n- *       // if propB was updated\n- *     }\n+ *   onChanges(changes) {\n+ *     console.log('onChanges - prop = ' + changes['prop'].currentValue);\n  *   }\n  * }\n- *  ```\n+ *\n+ * @Component({selector: 'app'})\n+ * @View({\n+ *   template: `\n+ *     <button (click)=\"value = value + 1\">Change MyComponent</button>\n+ *     <my-cmp [prop]=\"value\"></my-cmp>`,\n+ *   directives: [MyComponent]\n+ * })\n+ * export class App {\n+ *   value = 0;\n+ * }\n+ *\n+ * bootstrap(App).catch(err => console.error(err));\n+ * ```\n  */\n export interface OnChanges { onChanges(changes: StringMap<string, SimpleChange>); }\n \n /**\n- * Notify a directive when it has been checked the first time.\n+ * Implement this interface to get notified when the directive has been checked for the first time.","path":"modules/angular2/src/core/compiler/interfaces.ts","position":87,"original_position":87,"commit_id":"43436de04a46d61f862e1ade8fca1b815e97e269","original_commit_id":"43436de04a46d61f862e1ade8fca1b815e97e269","user":{"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},"body":"ok, in the light of the content below, this is the alternative version:\r\n\r\n----\r\nImplement this interface to get notified when the directive or component's data-bound properties have been initialized.\r\n\r\n----","created_at":"2015-09-30T17:03:38Z","updated_at":"2015-09-30T17:03:38Z","html_url":"https://github.com/angular/angular/pull/4357#discussion_r40820691","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/4357","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/40820691"},"html":{"href":"https://github.com/angular/angular/pull/4357#discussion_r40820691"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/4357"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/4357","id":45959230,"html_url":"https://github.com/angular/angular/pull/4357","diff_url":"https://github.com/angular/angular/pull/4357.diff","patch_url":"https://github.com/angular/angular/pull/4357.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/4357","number":4357,"state":"open","locked":false,"title":"doc(LifecycleHooks): update API doc","user":{"login":"vicb","id":248818,"avatar_url":"https://avatars.githubusercontent.com/u/248818?v=3","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"body":"first commit is #4337, second commit has the doc updates","created_at":"2015-09-24T22:44:12Z","updated_at":"2015-09-30T17:03:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89e9166e4200e3c7cb8646eef3e6ac9e400c4fcf","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":null,"commits_url":"https://api.github.com/repos/angular/angular/pulls/4357/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/4357/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/4357/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/43436de04a46d61f862e1ade8fca1b815e97e269","head":{"label":"vicb:0924-lchooks","ref":"0924-lchooks","sha":"43436de04a46d61f862e1ade8fca1b815e97e269","user":{"login":"vicb","id":248818,"avatar_url":"https://avatars.githubusercontent.com/u/248818?v=3","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"repo":{"id":24640725,"name":"angular","full_name":"vicb/angular","owner":{"login":"vicb","id":248818,"avatar_url":"https://avatars.githubusercontent.com/u/248818?v=3","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vicb/angular","description":"","fork":true,"url":"https://api.github.com/repos/vicb/angular","forks_url":"https://api.github.com/repos/vicb/angular/forks","keys_url":"https://api.github.com/repos/vicb/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vicb/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vicb/angular/teams","hooks_url":"https://api.github.com/repos/vicb/angular/hooks","issue_events_url":"https://api.github.com/repos/vicb/angular/issues/events{/number}","events_url":"https://api.github.com/repos/vicb/angular/events","assignees_url":"https://api.github.com/repos/vicb/angular/assignees{/user}","branches_url":"https://api.github.com/repos/vicb/angular/branches{/branch}","tags_url":"https://api.github.com/repos/vicb/angular/tags","blobs_url":"https://api.github.com/repos/vicb/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vicb/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vicb/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/vicb/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vicb/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/vicb/angular/languages","stargazers_url":"https://api.github.com/repos/vicb/angular/stargazers","contributors_url":"https://api.github.com/repos/vicb/angular/contributors","subscribers_url":"https://api.github.com/repos/vicb/angular/subscribers","subscription_url":"https://api.github.com/repos/vicb/angular/subscription","commits_url":"https://api.github.com/repos/vicb/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/vicb/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/vicb/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/vicb/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/vicb/angular/contents/{+path}","compare_url":"https://api.github.com/repos/vicb/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vicb/angular/merges","archive_url":"https://api.github.com/repos/vicb/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vicb/angular/downloads","issues_url":"https://api.github.com/repos/vicb/angular/issues{/number}","pulls_url":"https://api.github.com/repos/vicb/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/vicb/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/vicb/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vicb/angular/labels{/name}","releases_url":"https://api.github.com/repos/vicb/angular/releases{/id}","created_at":"2014-09-30T14:12:47Z","updated_at":"2015-05-20T05:57:15Z","pushed_at":"2015-09-30T16:06:47Z","git_url":"git://github.com/vicb/angular.git","ssh_url":"git@github.com:vicb/angular.git","clone_url":"https://github.com/vicb/angular.git","svn_url":"https://github.com/vicb/angular","homepage":null,"size":16990,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"7714d6a6eb9f25ab07d01804ce2757edeb49b14a","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-30T17:00:39Z","pushed_at":"2015-09-30T16:47:35Z","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":55169,"stargazers_count":5565,"watchers_count":5565,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1520,"mirror_url":null,"open_issues_count":480,"forks":1520,"open_issues":480,"watchers":5565,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/4357"},"html":{"href":"https://github.com/angular/angular/pull/4357"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/4357"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/4357/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/4357/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/4357/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/43436de04a46d61f862e1ade8fca1b815e97e269"}}}}