Skip to content

Rename project root, app component can break app.routes #57

@tomwhite007

Description

@tomwhite007

Describe the bug
Depending on the app.routes configuration (i.e. some apps, not others), the route paths get rewritten incorrectly. See example below:

Image

To Reproduce
Right click the src/app/app.component.ts or src/app/app.ts (in an Angular 20 generated project),
Rename the component to any new name,
Open the app.routes file and check the diff.

Expected behavior
Should not need to rename paths because the container folder has changed, not the local path.

Additional context
I've discovered this problem was present in version 3.x as well. It looks partly related to needing to rename backwards from the bottom of the file. But the fact is, it shouldn't be renamed because the paths are local.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions