angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Proper redirects with status codes (SEO reasons)

Open NgxDev opened this issue 8 years ago • 5 comments

  • I'm submitting a ...
- [x] feature request
  • What modules are related to this Issue?
- [x] aspnetcore-engine
- [x] express-engine
- [x] hapi-engine
  • Do you want to request a feature or report a bug? Request a feature

  • What is the current behavior? Currently, if we have a redirectTo in our route config or router.navigate or router.navigateByUrl in our code, Universal renders the appropriate component, but doesn't actually do a redirect.

  • What is the expected behavior? Given a redirectTo in our route config or router.navigate/navigateByUrl anywhere in our code, Universal should actually redirect to the appropriate route.

  • What is the motivation / use case for changing the behavior? For SEO reasons. We wouldn't want to render content on "wrong" route. Ideally, the @angular/router should also facilitate a way to let Universal know what status code is needed (but that would be an issue for the router).

  • Please tell us about your environment:

  • Angular version: 4+
  • Platform: [NodeJs]

NgxDev avatar Oct 12 '17 21:10 NgxDev