Skip to content

Pathless route consumes next path #26224

@miginmrs

Description

@miginmrs

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] 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
[ ] Other... Please describe:

Current behavior

When we create a url using a relativeTo pathless ActivatedRoute, it does consider the next non empty path of this ActivatedRoute as a part of the url.

Expected behavior

RelativeTo is understood as a base for the relative url so its expected to not add its children as parent of the current commands.

Minimal reproduction of the problem with instructions

In this example: https://stackblitz.com/edit/pathless-route we can see that links are correct only when the parent route is path-full or it has no activated child.

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

The importance of the correction of this behavior is to allow using many routes on the same level including a pathless route as a default route (as for languages) with the same children.

Environment

Angular version: 6.1.9

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions