Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
Modfying UrlTree created by Router.createUrlTree(...) can modify (because of shared/reused UrlSegmentGroups) the Router.currentUrlTree which can lead to really hard to debug bugs...
Router.createUrlTree(...) should return a completetely new and indepentent UrlTree or the behaviour with warning should be documented.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 15.2.10
Node: 20.11.1 (Unsupported)
Package Manager: npm 10.4.0
OS: win32 x64
Angular: 15.2.10
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Package Version
----------------------------------------------------------
@angular-devkit/architect 0.1502.10
@angular-devkit/build-angular 15.2.10
@angular-devkit/core 15.2.10
@angular-devkit/schematics 15.2.10
@angular-devkit/schematics-cli 15.2.10
@angular/cdk 15.2.9
@angular/google-maps 15.2.9
@schematics/angular 15.2.10
ng-packagr 15.2.2
rxjs 7.8.1
typescript 4.9.5
Anything else?
No response
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
Modfying UrlTree created by Router.createUrlTree(...) can modify (because of shared/reused UrlSegmentGroups) the Router.currentUrlTree which can lead to really hard to debug bugs...
Router.createUrlTree(...) should return a completetely new and indepentent UrlTree or the behaviour with warning should be documented.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version)Anything else?
No response