[BUG] RouterLink is using RouteAlias value instead of Route value in 14.5.1
See original GitHub issueDescribe the bug
A view class with a route something
and a route alias ""
(empty) was passed into RouterLink
to create a router-link anchor.
Before 14.5.1, the href
would be something
, but after upgrading to 14.5.1, it has become empty. This is causing some of our BDD tests to fail.
This is only an issue when the RouteAlias value is empty. If the RouteAlias is a non-empty value, the routerlink uses the route value as expected.
To Reproduce Steps to reproduce the behavior:
- Create a class as follow
@Route(value = "something", layout = MainLayout.class)
@RouteAlias(value = "", layout = MainLayout.class)
public class SomethingView extends VerticalLayout {
/* some content */
}
- Create a router link and use it on a view
RouterLink routerLink = new RouterLink(name, navigationTarget, parameter);
- Check the href of the anchor
Expected behavior
An anchor with something
as href.
I was upgrading from 14.4.7 to 14.5.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
@Route with url parameter template doesn't work ... - GitHub
Description of the bug / feature Navigation to a page having the ... [BUG] RouterLink is using RouteAlias value instead of Route value...
Read more >Angular routerLink does not navigate to the corresponding ...
So go to the module that declares the component with this template and add: import { RouterModule } from '@angular/router';. then add it...
Read more >Mastering RouterLink - Briebug Blog
We're going to keep it simple with the following route configuration. ... to the element and give it a valid Angular route as...
Read more >Annotation Type RouteAlias - Vaadin
Defines the route alias for components that function as navigation targets in routing. ... Gets the route alias path value of the annotated...
Read more >RouterLink - Angular
Note that a value of undefined here will use the routerLink default. ... If the first segment begins with / , the router...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you are using OSGi in your apps, I would recommend you to update to version 14.4.10 immediately to get the fix in use for your apps. This way you don’t have to wait for anything or make any changes.
I cannot give any promises to when this would be fixed exactly. As it is not a
Severity: Blocker
, it would not be urgent and assigned immediately unless prioritized by someone, but since it is regression, it is in the priority-queue after other prioritized issues.This ticket/PR has been released with platform 14.6.0.beta2. For prerelease versions, it will be included in its final version.