Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

server side rendering of async child route parameters with routerLink from http response #330

Closed

Description

Note: for support questions, please use one of these channels: https://github.com/angular/universal/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.

  • I'm submitting a ...
  • bug report
  • What modules are related to this pull-request
  • universal
  • Do you want to request a feature or report a bug?
    bug
  • What is the current behavior?
    When using async child routes and creating routerLinks within an ngFor the link provided by the server side rendering is broken. It does not append the path variable to the child route. The href of the a element created from the [routerLink] directive excludes the route parameters.
  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem by creating a github repo.
<ul class="list-group">
    <li *ngFor="#directory of directories" class="list-group-item">        
        <!-- Router link -->
        <a [routerLink]="[directory.path, directory.component, {id:directory.id}]" (click)="select(directory)" class="clickable">{{ directory.name }}</a>        
    </li>
</ul>

https://github.com/wellingWilliam/AngularUniversalDSpaceUIPrototype.git

  • What is the expected behavior?

The rendered html to contain the complete path including the route parameter.

Electronic Theses And Dissertation Community

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

Be able to navigate with child routes using parameters. For when JavaScript is disabled and for crawlers and indexers.

  • Please tell us about your environment:
  • Angular version: 2.0.0-beta.X
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5 ]
  • OS: [all | Mac OS X | Windows | Linux ]
  • Platform: [all | NodeJs | Java | PHP | .Net | Ruby]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Activity

  1. ghost changed the title [-]async child routes with routerLink[/-] [+]server side rendering of async child route parameters with routerLink[/+] on Mar 22, 2016
  2. ghost changed the title [-]server side rendering of async child route parameters with routerLink[/-] [+]server side rendering of async child route parameters with routerLink from http response[/+] on Mar 23, 2016
  3. PatrickJS commented on Mar 24, 2016

    @PatrickJS
    Contributor

    @wellingWilliam can you make a issue (or pull-request) in the angular repo and provide a link to this one

  4. jeffwhelpley commented on May 6, 2016

    @jeffwhelpley
    Contributor

    @jeffbcross is there any way to know when the PR for this in core will be merged? I know there are a lot of PRs backed up so it likely won't be for a little bit, but how can we track it?

  5. PatrickJS commented on Jun 30, 2016

    @PatrickJS
    Contributor

    obsolete with new router but may still be a problem with NodePlatformLocation

  6. kuldeepkeshwar commented on Aug 30, 2016

    @kuldeepkeshwar

    @jeffwhelpley @gdi2290 I'm facing the same issue and below are the packages I'm using

       "@angular/common": "2.0.0-rc.4",
        "@angular/compiler": "2.0.0-rc.4",
        "@angular/core": "2.0.0-rc.4",
        "@angular/forms": "0.2.0",
        "@angular/http": "2.0.0-rc.4",
        "@angular/platform-browser": "2.0.0-rc.4",
        "@angular/platform-browser-dynamic": "2.0.0-rc.4",
        "@angular/platform-server": "2.0.0-rc.4",
        "@angular/router": "3.0.0-alpha.8",
        "angular2-express-engine": "0.15.0",
        "angular2-universal": "0.104.5"
    
  7. kuldeepkeshwar commented on Aug 30, 2016

    @kuldeepkeshwar

    this happens if the response from the server is taking time. I have tested it by varying the response time.it works fine for response time below ~95 milliseconds.

  8. angular-automatic-lock-bot commented on Sep 4, 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 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions