Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 139923

Is there any way to disable/prevent options to "Open in a new tab/window" when using RouterLink in Angular 5?

$
0
0

I have a single page application and using RouterLink in anchor tag() to navigate to other pages without refresh.

<ul class="menu">
          <li *ngIf="isContain(adminFilterMenuItems, 'Setup')">
            <a id="NavSetupButton" routerLink="/setup">
              <img alt="Setup" src="./assets/images/Setup.png" />
            </a>
          </li>
</ul>

I have the requirement to disable options on right click, such as "Open in a new tab", "Open in a new window" etc.

I have observed that when I do not use RouterLink and implement other logic to navigate, I do not see those options on right click, which I want. But I am using RouterLink and don't want to mess with entire application for such a requirement.

Is there any way to prevent/disable right click options while using RouterLink for navigation?


Viewing all articles
Browse latest Browse all 139923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>