Skip to content

documentation of router outlet #19443

Closed
Closed

Description

@rberge

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

This is from the current tutorial on routing as of August 27,2017 at this url https://angular.io/guide/router

Router outlet

Given this configuration, when the browser URL for this application becomes /heroes, the router matches that URL to the route path /heroes and displays the HeroListComponent after a RouterOutlet that you've placed in the host view's HTML.

content_copy

Expected behavior

What is a host view HTML?
In the plunker and download files, there are not very many html files.
I find a router-outlet in app.component.html but it is surrounded by an "if" statement and there is nothing after it.
<% if (routing) { %>
<% } %>

here is an example of the files from the download from the website
(see uploaded screen shot)
screen shot 2017-09-27 at 11 34 42 am

I don't understand what the tutorial is saying or why the examples don't match. Is it possible to review and explain?

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Angular version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

Activity

  1. kapunahelewong commented on Oct 3, 2017

    @kapunahelewong
    Contributor

    Hi @rberge, the host view in this case is the template in app/app.component.ts. It hosts anything that is rendered through a <router-outlet>. I'm not finding the if (routing) in the live example or the download. Can you point me to it? I'd love to help clear things up.

  2. rberge commented on Oct 6, 2017

    @rberge
    Author
  3. kapunahelewong commented on Oct 6, 2017

    @kapunahelewong
    Contributor

    @rberge ok, let me know if you have any questions or suggestions for improvement. I'm still interested in the if statement you referenced. If you see it again, please let me know so I can take a look.

  4. added this to the needsTriage milestone on Feb 26, 2018
  5. modified the milestones: needsTriage, Backlog on May 8, 2018
  6. jenniferfell commented on May 10, 2018

    @jenniferfell
    Contributor

    I think the remaining summary is this: Update https://angular.io/guide/router#router-outlet to be more clear about this: the host view in this case is the template in app/app.component.ts. It hosts anything that is rendered through a .

  7. brandonroberts commented on Sep 26, 2018

    @brandonroberts
    Contributor

    Fixed via #20023

  8. angular-automatic-lock-bot commented on Sep 14, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions