Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Router: Route config for named nested routes is not generated correctly #273

Closed
1 of 2 tasks
markostanimirovic opened this issue Feb 20, 2023 · 4 comments
Closed
1 of 2 tasks
Assignees
Labels
accepting PRs bug Something isn't working

Comments

@markostanimirovic
Copy link
Member

markostanimirovic commented Feb 20, 2023

Which area/package is the issue in?

router

Description

If the routes directory has the following structure:

/routes
  /users
    create.ts

Navigation to /users/create will not work. As a workaround, we can use 'dot' notation:

/routes
  users.create.ts

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@brandonroberts
Copy link
Member

Thanks @markostanimirovic. I think this should be supported also.

This was also brought up in the Analog Discord

@yassernasc
Copy link
Contributor

Hello, I am having trouble creating a route with the scheme: route.[route-id].subroute.[subroute-id].ts and I think Analog wasn't designed to handle such a complex scenario. Is my problem related to this github issue?

@brandonroberts
Copy link
Member

@yassernasc that should be supported, but its a separate issue. Its a bug in the replacement for the paths

https://github.com/analogjs/analog/blob/main/packages/router/src/lib/routes.ts#L51

Only the first period is being replaced.

@yassernasc
Copy link
Contributor

I see, thank you for pointing out the exact location to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting PRs bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants