question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ctrl+Click behaviour to open new tab does not work with RouterLink

See original GitHub issue

In Chrome or FF, I often like to Ctrl+Click a link to open it in a new tab.

An anchor with the [router-link] directive does not behave this way, and affects the current browser tab. This could be very annoying for users.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:29
  • Comments:11

github_iconTop GitHub Comments

13reactions
pcroccommented, Feb 29, 2016

Please can this issue be assessed and prioritized? Although there is a workaround be redefining router-link (as above), this is something that badly impacts UX and will affect almost everyone.

5reactions
gracewcommented, May 25, 2016

Looks like a fix for this is in progress, but for anyone using the suggested workarounds: make sure that you are only using the routerLink selector on <a> tags (not <li>, <div>, etc.).

Prior to switching to <a> tags I was running into the same problem as @beljand where the meta key was being captured but new tabs weren’t getting opened.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to enable "ctrl+click" with "routerLink" in Angular
When I press on image it routes perfect, I want to press ctrl+click to open this link in new tab, or drag this...
Read more >
Why does CTRL-click not open some links in a new tab?
The default behaviour of ctrl+click, shift+click and cmd+click when clicking on links is to open the link in a new tab or new...
Read more >
Router tutorial: tour of heroes - Angular
This tutorial provides an extensive overview of the Angular router. In this tutorial, you build upon a basic router configuration to explore features...
Read more >
Angular Navigation: How Routing & Redirects Work in Angular ...
This guide covers how routing works in an app built with Ionic and Angular. The Angular Router is one of the most important...
Read more >
ctrl+click angular 4
angular routerlink open in new tab. Angular Material Tabs organize content into separate views where only one view can be visible at a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found