Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Seed app routing issue with vCD 10.1 #19

Closed
shubhamkr-cohesity opened this issue Jun 8, 2020 · 2 comments
Closed

Seed app routing issue with vCD 10.1 #19

shubhamkr-cohesity opened this issue Jun 8, 2020 · 2 comments

Comments

@shubhamkr-cohesity
Copy link

Describe the bug
With vCD 10.1, the angular container version has been upgraded to 8+ in vCD appliance. With this new version, I am encountering routing issue with my existing plugin which worked well otherwise.

Issue:
Not able to navigate using
router.navigate(router.navigate([extentionPrefix, 'about'])

I have setup a router guard in my routing module to redirect certain requests based on user role,
eg
/plugin/ -> Redirect to /plugin/config // Provider view
/plugin/ -> Redirect to /plugin/overview // Tenant view

I handle this redirection through a router guard and call the router (Router) navigate API to redirect the user.

The error I see in v10.1 is,
Error: Cannot match any routes. URL Segment: 'about'

My routes:
const ROUTES: Routes = [ { path: "", component: SubnavComponent, children: [ { path: "", redirectTo: "status", pathMatch: "full" }, { path: "status", component: StatusComponent, canActivate: [RouterGuardService] }, { path: "about", component: AboutComponent } ] } ];

If I open the URL /plugin/about directly, it works fine.

To Reproduce
Steps to reproduce the behaviour:

  1. Add a router guard to a route.
  2. Redirect the request to a different endpoint through the guard using the navigate() API.

Expected behavior
Since the route is valid, the redirect should have worked just fine.

Screenshots
image

Desktop (please complete the following information):

  • OS: Max
  • Browser Chrome
@nvladimirovi
Copy link
Contributor

Hello,

Thank you to letting us know about this one. I think 10.1 dev container branch is not ready yet, at this point it's the same like 9.7 - 10.0. (My comment is not relevant if you took the branch implementation from my PR: #24)

@nvladimirovi
Copy link
Contributor

Please refer to our documentation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants