1

When I click on a link in my vaadin application it gets intercepted by the router and only the components get changed, no page reload is done.

But as descripted in the vaadin docs it should only happen when you add the "router-link" HTML-Attribute. https://vaadin.com/docs/latest/routing/navigation#using-standard-links

Since when has this changed? And how can I prevent this?

My first idea was to add a click listener that stops the event bubbling and does a "window.location=". But I wonder if there is a more straightforward way to achieve this or a config option that I'm missing.

Oliver Stahl
  • 617
  • 3
  • 19
  • `window.location=` is quite straightforward and valid option. Basically you need a page reload when navigating to a link? or why else would you avoid router behavior? – Max Larionov Jul 08 '22 at 06:35
  • 1
    I think this is related to https://stackoverflow.com/questions/72727825/vaadin-anchor-sets-internal-url-in-browser-but-does-not-navigate – Knoobie Jul 08 '22 at 06:45
  • Thanks @Knoobie , "router-ignore" is the html-attribute i searched for. – Oliver Stahl Jul 08 '22 at 06:47

1 Answers1

2

As descripted by @Knoobie in https://stackoverflow.com/a/72728856/16651073

When you add the "router-ignore" attribute to an anchor. It will do a page reload on click.

Oliver Stahl
  • 617
  • 3
  • 19