{"action":"opened","issue":{"url":"https://api.github.com/repos/johnpapa/angular2-tour-of-heroes/issues/84","repository_url":"https://api.github.com/repos/johnpapa/angular2-tour-of-heroes","labels_url":"https://api.github.com/repos/johnpapa/angular2-tour-of-heroes/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/johnpapa/angular2-tour-of-heroes/issues/84/comments","events_url":"https://api.github.com/repos/johnpapa/angular2-tour-of-heroes/issues/84/events","html_url":"https://github.com/johnpapa/angular2-tour-of-heroes/issues/84","id":179911077,"number":84,"title":"Properties: equal sign vs colon","user":{"login":"denisemauldin","id":196261,"avatar_url":"https://avatars.githubusercontent.com/u/196261?v=3","gravatar_id":"","url":"https://api.github.com/users/denisemauldin","html_url":"https://github.com/denisemauldin","followers_url":"https://api.github.com/users/denisemauldin/followers","following_url":"https://api.github.com/users/denisemauldin/following{/other_user}","gists_url":"https://api.github.com/users/denisemauldin/gists{/gist_id}","starred_url":"https://api.github.com/users/denisemauldin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisemauldin/subscriptions","organizations_url":"https://api.github.com/users/denisemauldin/orgs","repos_url":"https://api.github.com/users/denisemauldin/repos","events_url":"https://api.github.com/users/denisemauldin/events{/privacy}","received_events_url":"https://api.github.com/users/denisemauldin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-28T22:49:45Z","updated_at":"2016-09-28T22:49:45Z","closed_at":null,"body":"Hi all,\r\n\r\nI've never used Typescript before, so perhaps this is a super newbie question, but I've had some problems understanding the equal sign vs the colon in the tutorial.  At the end of toh-pt2.html, the class looks like this:\r\n\r\n```\r\nexport class AppComponent {\r\n  title = 'Tour of Heroes';\r\n  heroes = HEROES;\r\n  selectedHero: Hero;\r\n  onSelect(hero: Hero): void {\r\n    this.selectedHero = hero;\r\n  }\r\n}\r\n```\r\n\r\nThe tutorial does not explain what the difference is between an equal sign and a colon in the property assignment, but the code doesn't work if you switch them (ie: heroes: HEROES; or selectedHero = Hero;).  \"Let’s create a public property in AppComponent that exposes the heroes for binding.\" is how \"heros = HEROES;\" is described. \"We no longer need the static hero property of the AppComponent. Replace it with this simple selectedHero property:\" is how \"selectedHero: Hero;\" is defined.  \r\n\r\nIt seems like we're using selectedHero as an object property, but that title and heroes are properties in the object? When do we need to use object properties(:) versus properties(=)?  "}}
{"actor":{"display_login":"denisemauldin"}}