{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.io/issues/3137","repository_url":"https://api.github.com/repos/angular/angular.io","labels_url":"https://api.github.com/repos/angular/angular.io/issues/3137/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.io/issues/3137/comments","events_url":"https://api.github.com/repos/angular/angular.io/issues/3137/events","html_url":"https://github.com/angular/angular.io/issues/3137","id":203118734,"number":3137,"title":"Document the fact that underscores are acceptable for backing fields","user":{"login":"battmanz","id":1054833,"avatar_url":"https://avatars.githubusercontent.com/u/1054833?v=3","gravatar_id":"","url":"https://api.github.com/users/battmanz","html_url":"https://github.com/battmanz","followers_url":"https://api.github.com/users/battmanz/followers","following_url":"https://api.github.com/users/battmanz/following{/other_user}","gists_url":"https://api.github.com/users/battmanz/gists{/gist_id}","starred_url":"https://api.github.com/users/battmanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/battmanz/subscriptions","organizations_url":"https://api.github.com/users/battmanz/orgs","repos_url":"https://api.github.com/users/battmanz/repos","events_url":"https://api.github.com/users/battmanz/events{/privacy}","received_events_url":"https://api.github.com/users/battmanz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-25T14:34:19Z","updated_at":"2017-02-01T12:08:53Z","closed_at":null,"body":"As @wardbell has [mentioned](https://github.com/angular/angular.io/issues/1108#issuecomment-268634925) when you have a backing \"field\" for a public getter/setter, it's handy to prefix it with an underscore. Just to repeat his example:\r\n\r\n```javascript\r\nprivate _foo;\r\nget foo() { return this._foo; }\r\nset foo(value: any) { \r\n  console.log(`${this._foo} changed to ${value}`);\r\n  this._foo = value;\r\n}\r\n```\r\n\r\nCan that be added to the style guide?"},"comment":{"url":"https://api.github.com/repos/angular/angular.io/issues/comments/276642165","html_url":"https://github.com/angular/angular.io/issues/3137#issuecomment-276642165","issue_url":"https://api.github.com/repos/angular/angular.io/issues/3137","id":276642165,"user":{"login":"haschu","id":13450260,"avatar_url":"https://avatars.githubusercontent.com/u/13450260?v=3","gravatar_id":"","url":"https://api.github.com/users/haschu","html_url":"https://github.com/haschu","followers_url":"https://api.github.com/users/haschu/followers","following_url":"https://api.github.com/users/haschu/following{/other_user}","gists_url":"https://api.github.com/users/haschu/gists{/gist_id}","starred_url":"https://api.github.com/users/haschu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haschu/subscriptions","organizations_url":"https://api.github.com/users/haschu/orgs","repos_url":"https://api.github.com/users/haschu/repos","events_url":"https://api.github.com/users/haschu/events{/privacy}","received_events_url":"https://api.github.com/users/haschu/received_events","type":"User","site_admin":false},"created_at":"2017-02-01T12:08:53Z","updated_at":"2017-02-01T12:08:53Z","body":"+1"}}
{"actor":{"display_login":"haschu"}}