{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.js/pulls/comments/60623936","id":60623936,"diff_hunk":"@@ -0,0 +1,475 @@\n+@ngdoc overview\n+@name Decorators\n+@sortOrder 345\n+@description\n+\n+# Decorators in AngularJS\n+\n+<div class=\"alert alert-warning\">\n+  **NOTE:** This guide is targeted towards developers who are already familiar with AngularJS basics.\n+  If you're just getting started, we recommend the {@link tutorial/ tutorial} first.\n+</div>\n+\n+## What are decorators?\n+\n+Decorators are used to facilitate a decorator design pattern. This pattern is used to separate modification or\n+*decoration* of a class without modifying the original source code. In Angular, decorators are functions that allow a\n+service, directive or filter to be modified prior to its usage.","path":"docs/content/guide/decorators.ngdoc","position":17,"original_position":17,"commit_id":"551eb178cb483ecdfc501eb0862cce857cb87126","original_commit_id":"551eb178cb483ecdfc501eb0862cce857cb87126","user":{"login":"sjbarker","id":2990942,"avatar_url":"https://avatars.githubusercontent.com/u/2990942?v=3","gravatar_id":"","url":"https://api.github.com/users/sjbarker","html_url":"https://github.com/sjbarker","followers_url":"https://api.github.com/users/sjbarker/followers","following_url":"https://api.github.com/users/sjbarker/following{/other_user}","gists_url":"https://api.github.com/users/sjbarker/gists{/gist_id}","starred_url":"https://api.github.com/users/sjbarker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjbarker/subscriptions","organizations_url":"https://api.github.com/users/sjbarker/orgs","repos_url":"https://api.github.com/users/sjbarker/repos","events_url":"https://api.github.com/users/sjbarker/events{/privacy}","received_events_url":"https://api.github.com/users/sjbarker/received_events","type":"User","site_admin":false},"body":"Reworded to avoid confusion.","created_at":"2016-04-21T17:39:34Z","updated_at":"2016-04-21T17:39:34Z","html_url":"https://github.com/angular/angular.js/pull/14372#discussion_r60623936","pull_request_url":"https://api.github.com/repos/angular/angular.js/pulls/14372","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/60623936"},"html":{"href":"https://github.com/angular/angular.js/pull/14372#discussion_r60623936"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.js/pulls/14372"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/14372","id":65237873,"html_url":"https://github.com/angular/angular.js/pull/14372","diff_url":"https://github.com/angular/angular.js/pull/14372.diff","patch_url":"https://github.com/angular/angular.js/pull/14372.patch","issue_url":"https://api.github.com/repos/angular/angular.js/issues/14372","number":14372,"state":"open","locked":false,"title":"docs(guide/decorators): add decorator guide","user":{"login":"sjbarker","id":2990942,"avatar_url":"https://avatars.githubusercontent.com/u/2990942?v=3","gravatar_id":"","url":"https://api.github.com/users/sjbarker","html_url":"https://github.com/sjbarker","followers_url":"https://api.github.com/users/sjbarker/followers","following_url":"https://api.github.com/users/sjbarker/following{/other_user}","gists_url":"https://api.github.com/users/sjbarker/gists{/gist_id}","starred_url":"https://api.github.com/users/sjbarker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjbarker/subscriptions","organizations_url":"https://api.github.com/users/sjbarker/orgs","repos_url":"https://api.github.com/users/sjbarker/repos","events_url":"https://api.github.com/users/sjbarker/events{/privacy}","received_events_url":"https://api.github.com/users/sjbarker/received_events","type":"User","site_admin":false},"body":"**What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)**\r\n\r\nDocs update.\r\n\r\n**What is the current behavior? (You can also link to an open issue here)**\r\n\r\nThere currently is no guide for decorators.\r\n\r\n**What is the new behavior (if this is a feature change)?**\r\n\r\nAdd a guide document for decorators\r\n\r\n**Does this PR introduce a breaking change?**\r\n\r\nNo.\r\n\r\n**Please check if the PR fulfills these requirements**\r\n- [x] The commit message follows our guidelines: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format\r\n- [ ] Tests for the changes have been added (for bug fixes / features)\r\n- [ ] Docs have been added / updated (for bug fixes / features)\r\n\r\n**Other information**:\r\n\r\n\r\n+ explain decorators and how they are implemented in angular\r\n+ explain how different types of services can be selected\r\n+ explain `$delegate` objects and how they differ between services\r\n+ warn of the risks/caveats of `$delegate` modification\r\n+ note the exposure of `decorator` through the module api\r\n+ show an example of decorating a core service\r\n+ show an example of decorating a core directive\r\n+ show an example of decorating a core filter\r\n\r\ncloses #12163","created_at":"2016-04-05T01:19:13Z","updated_at":"2016-04-21T17:39:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9e62bf6767485c8db507ddd4d1db6b4dd35353c","assignee":{"login":"Narretz","id":1153097,"avatar_url":"https://avatars.githubusercontent.com/u/1153097?v=3","gravatar_id":"","url":"https://api.github.com/users/Narretz","html_url":"https://github.com/Narretz","followers_url":"https://api.github.com/users/Narretz/followers","following_url":"https://api.github.com/users/Narretz/following{/other_user}","gists_url":"https://api.github.com/users/Narretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Narretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narretz/subscriptions","organizations_url":"https://api.github.com/users/Narretz/orgs","repos_url":"https://api.github.com/users/Narretz/repos","events_url":"https://api.github.com/users/Narretz/events{/privacy}","received_events_url":"https://api.github.com/users/Narretz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/90","html_url":"https://github.com/angular/angular.js/milestones/1.5.x","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/90/labels","id":1025270,"number":90,"title":"1.5.x","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":93,"closed_issues":121,"state":"open","created_at":"2015-03-17T12:15:49Z","updated_at":"2016-04-14T19:53:05Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/angular/angular.js/pulls/14372/commits","review_comments_url":"https://api.github.com/repos/angular/angular.js/pulls/14372/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/14372/comments","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/551eb178cb483ecdfc501eb0862cce857cb87126","head":{"label":"sjbarker:decorator-guide","ref":"decorator-guide","sha":"551eb178cb483ecdfc501eb0862cce857cb87126","user":{"login":"sjbarker","id":2990942,"avatar_url":"https://avatars.githubusercontent.com/u/2990942?v=3","gravatar_id":"","url":"https://api.github.com/users/sjbarker","html_url":"https://github.com/sjbarker","followers_url":"https://api.github.com/users/sjbarker/followers","following_url":"https://api.github.com/users/sjbarker/following{/other_user}","gists_url":"https://api.github.com/users/sjbarker/gists{/gist_id}","starred_url":"https://api.github.com/users/sjbarker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjbarker/subscriptions","organizations_url":"https://api.github.com/users/sjbarker/orgs","repos_url":"https://api.github.com/users/sjbarker/repos","events_url":"https://api.github.com/users/sjbarker/events{/privacy}","received_events_url":"https://api.github.com/users/sjbarker/received_events","type":"User","site_admin":false},"repo":{"id":30548024,"name":"angular.js","full_name":"sjbarker/angular.js","owner":{"login":"sjbarker","id":2990942,"avatar_url":"https://avatars.githubusercontent.com/u/2990942?v=3","gravatar_id":"","url":"https://api.github.com/users/sjbarker","html_url":"https://github.com/sjbarker","followers_url":"https://api.github.com/users/sjbarker/followers","following_url":"https://api.github.com/users/sjbarker/following{/other_user}","gists_url":"https://api.github.com/users/sjbarker/gists{/gist_id}","starred_url":"https://api.github.com/users/sjbarker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjbarker/subscriptions","organizations_url":"https://api.github.com/users/sjbarker/orgs","repos_url":"https://api.github.com/users/sjbarker/repos","events_url":"https://api.github.com/users/sjbarker/events{/privacy}","received_events_url":"https://api.github.com/users/sjbarker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sjbarker/angular.js","description":"HTML enhanced for web apps","fork":true,"url":"https://api.github.com/repos/sjbarker/angular.js","forks_url":"https://api.github.com/repos/sjbarker/angular.js/forks","keys_url":"https://api.github.com/repos/sjbarker/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sjbarker/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sjbarker/angular.js/teams","hooks_url":"https://api.github.com/repos/sjbarker/angular.js/hooks","issue_events_url":"https://api.github.com/repos/sjbarker/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/sjbarker/angular.js/events","assignees_url":"https://api.github.com/repos/sjbarker/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/sjbarker/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/sjbarker/angular.js/tags","blobs_url":"https://api.github.com/repos/sjbarker/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sjbarker/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sjbarker/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/sjbarker/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sjbarker/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/sjbarker/angular.js/languages","stargazers_url":"https://api.github.com/repos/sjbarker/angular.js/stargazers","contributors_url":"https://api.github.com/repos/sjbarker/angular.js/contributors","subscribers_url":"https://api.github.com/repos/sjbarker/angular.js/subscribers","subscription_url":"https://api.github.com/repos/sjbarker/angular.js/subscription","commits_url":"https://api.github.com/repos/sjbarker/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/sjbarker/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/sjbarker/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/sjbarker/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/sjbarker/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/sjbarker/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sjbarker/angular.js/merges","archive_url":"https://api.github.com/repos/sjbarker/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sjbarker/angular.js/downloads","issues_url":"https://api.github.com/repos/sjbarker/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/sjbarker/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/sjbarker/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/sjbarker/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sjbarker/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/sjbarker/angular.js/releases{/id}","deployments_url":"https://api.github.com/repos/sjbarker/angular.js/deployments","created_at":"2015-02-09T17:19:56Z","updated_at":"2016-03-13T01:48:50Z","pushed_at":"2016-04-21T16:07:41Z","git_url":"git://github.com/sjbarker/angular.js.git","ssh_url":"git@github.com:sjbarker/angular.js.git","clone_url":"https://github.com/sjbarker/angular.js.git","svn_url":"https://github.com/sjbarker/angular.js","homepage":"http://angularjs.org","size":74893,"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":"d2ec9d71843b645d1b7e1f2ee69b53af66b9647d","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}","deployments_url":"https://api.github.com/repos/angular/angular.js/deployments","created_at":"2010-01-06T00:34:37Z","updated_at":"2016-04-21T16:27:29Z","pushed_at":"2016-04-21T16:07:42Z","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":175866,"stargazers_count":48714,"watchers_count":48714,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23202,"mirror_url":null,"open_issues_count":1126,"forks":23202,"open_issues":1126,"watchers":48714,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/14372"},"html":{"href":"https://github.com/angular/angular.js/pull/14372"},"issue":{"href":"https://api.github.com/repos/angular/angular.js/issues/14372"},"comments":{"href":"https://api.github.com/repos/angular/angular.js/issues/14372/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.js/pulls/14372/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/14372/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.js/statuses/551eb178cb483ecdfc501eb0862cce857cb87126"}}}}