{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.io/issues/1352","repository_url":"https://api.github.com/repos/angular/angular.io","labels_url":"https://api.github.com/repos/angular/angular.io/issues/1352/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.io/issues/1352/comments","events_url":"https://api.github.com/repos/angular/angular.io/issues/1352/events","html_url":"https://github.com/angular/angular.io/pull/1352","id":154069739,"number":1352,"title":"docs(toh): put a bit of clarification","user":{"login":"Foxandxss","id":1087957,"avatar_url":"https://avatars.githubusercontent.com/u/1087957?v=3","gravatar_id":"","url":"https://api.github.com/users/Foxandxss","html_url":"https://github.com/Foxandxss","followers_url":"https://api.github.com/users/Foxandxss/followers","following_url":"https://api.github.com/users/Foxandxss/following{/other_user}","gists_url":"https://api.github.com/users/Foxandxss/gists{/gist_id}","starred_url":"https://api.github.com/users/Foxandxss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foxandxss/subscriptions","organizations_url":"https://api.github.com/users/Foxandxss/orgs","repos_url":"https://api.github.com/users/Foxandxss/repos","events_url":"https://api.github.com/users/Foxandxss/events{/privacy}","received_events_url":"https://api.github.com/users/Foxandxss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.io/labels/CLA:%20yes","name":"CLA: yes","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-10T18:03:55Z","updated_at":"2016-05-16T12:59:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/angular/angular.io/pulls/1352","html_url":"https://github.com/angular/angular.io/pull/1352","diff_url":"https://github.com/angular/angular.io/pull/1352.diff","patch_url":"https://github.com/angular/angular.io/pull/1352.patch"},"body":"So @johnpapa got some feedback on the ToH and asked me to try to improve it.\r\n\r\nLet me go step by step:\r\n\r\n_Multiple components_\r\n\r\n>Let's add that array property to the bottom of the @Component configuration object, immediately after the template and styles properties.\r\n>>**Which file?**\r\n>>**Also, does it matter where in @Component configuration this is put?**\r\n\r\nI put a label in the example to specify which file and also reworded the sentence a bit to tell that where to put the array is a matter of choice than a fixed place.\r\n\r\n>Let’s verify that we have the following structure\r\n\r\n>>**You might want to say “.js and .map files not shown**\r\n\r\nThis part refers to the filetrees. I personally don't think that we need to explicitly say that the .js and .map files are not shown.\r\n\r\n---\r\n\r\n_Services_\r\n\r\n>The Injector has a container of previously created services. Either it finds and returns a pre-existing HeroService from its container or it creates a new instance, adds it to the container, and returns it to Angular.\r\n\r\n>>**Say a bit more about the container. Is this an actual object I could interact with?**\r\n\r\nAfter this bit, we have a link about \"Learn more about dependency injection\". Personally I don't think we can or even if we should talk more about containers in the tutorial. Truth being said, we never ever say the word \"container\" anymore in either \"Dependency Injection\" or \"Hierarchical injectors\" guides. Perhaps we could do some work on \"Dependency Injection\" to name those containers so the reader won't get confused.\r\n\r\n>Recall that the AppComponent creates an instance of HeroDetail by virtue of the <my-hero-detail> tag at the bottom of its template. That HeroDetail is a child of the AppComponent.\r\nIf the HeroDetailComponent needed its parent component's HeroService, it would ask Angular to inject the service into its constructor which would look just like the one for AppComponent:\r\n\r\n>>**This may require a bit of rewriting into smaller conceptual bites.**\r\n\r\n>constructor(private heroService: HeroService) { }\r\n\r\n>>**I don't think you told me to add the import statement first.**\r\n\r\nThis is a blue box on the guide that explains that if we want to inject `HeroService` in the child component, we shouldn't use the providers array. What I did here is to update the code example label to say that that is an example. It is easy for the reader to get confused and think that the snippet is something that they should code. So yes, no import statement because that is just an example.\r\n\r\nThat being said, I think that we could get rid of the box. That is just like an excerpt of the `Dependency Injection` guide and we cannot rewrite it into smaller conceptual bites, because that is what the `Dependency injection` guide does. I suggest removing the blue box or making it more explicit that this is an excerpt of the `Dependency Injection` guide and that they can learn more there.\r\n\r\n>Appendix: Shadowing the parent's service\r\n\r\n>>**It isn’t clear what creates the parent-child relationship**\r\n\r\nThis appendix is a continuation from the blue box and again, something that is already explained elsewhere and confuses the reader. I would drop it too.\r\n\r\n---\r\n\r\nSo I updated the parts I see value in and if someone has a good feedback on the other points, I will update this PR.\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular.io/issues/comments/219418870","html_url":"https://github.com/angular/angular.io/pull/1352#issuecomment-219418870","issue_url":"https://api.github.com/repos/angular/angular.io/issues/1352","id":219418870,"user":{"login":"Foxandxss","id":1087957,"avatar_url":"https://avatars.githubusercontent.com/u/1087957?v=3","gravatar_id":"","url":"https://api.github.com/users/Foxandxss","html_url":"https://github.com/Foxandxss","followers_url":"https://api.github.com/users/Foxandxss/followers","following_url":"https://api.github.com/users/Foxandxss/following{/other_user}","gists_url":"https://api.github.com/users/Foxandxss/gists{/gist_id}","starred_url":"https://api.github.com/users/Foxandxss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foxandxss/subscriptions","organizations_url":"https://api.github.com/users/Foxandxss/orgs","repos_url":"https://api.github.com/users/Foxandxss/repos","events_url":"https://api.github.com/users/Foxandxss/events{/privacy}","received_events_url":"https://api.github.com/users/Foxandxss/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T12:59:39Z","updated_at":"2016-05-16T12:59:39Z","body":"The person that gave the feedback things that the gray box (that explains hierarchical injection) is a bit confusing and should be explained more \"step by step\". I can understand that the gray box is a bit \"complicated\", but that gray box is just an excerpt of another guide we have, so instead of rewording the gray box, we can point people to the original guide.\r\n\r\nThere is also another part in services that talks about injections and containers and that person is confused about the word \"containers\". Containers is a DI concept but our DI guides never say \"containers\", that could be confusing."}}