mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-12-21 14:17:07 +00:00
(routing) Use "corrected" behavior for relative link resolution (https://github.com/angular/angular/pull/22394) as it's the default value starting from Angular v11 (https://github.com/angular/angular/pull/25609)
This commit is contained in:
@@ -490,22 +490,15 @@ export class TasksDetailsComponent implements OnInit, AfterViewInit, OnDestroy
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the current activated route
|
||||
let route = this._activatedRoute;
|
||||
while ( route.firstChild )
|
||||
{
|
||||
route = route.firstChild;
|
||||
}
|
||||
|
||||
// Navigate to the next task if available
|
||||
if ( nextTaskId )
|
||||
{
|
||||
this._router.navigate(['../', nextTaskId], {relativeTo: route});
|
||||
this._router.navigate(['../', nextTaskId], {relativeTo: this._activatedRoute});
|
||||
}
|
||||
// Otherwise, navigate to the parent
|
||||
else
|
||||
{
|
||||
this._router.navigate(['../'], {relativeTo: route});
|
||||
this._router.navigate(['../'], {relativeTo: this._activatedRoute});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user