0

in angular 4 project, i have created my own library for rendering sidebar and included that library in main project. Now issue is i want to enable "open in new tab/window" option in context menu of browser. But i don't want to reload the full page when user clicks on the link on same page.

<a routerLink="['/{menu.href}']" routerLinkActive="active" [ngClass]="{'router-link-active text-primary' : chileMenuId === cmenu.id }" (click)="onMenuClick(cmenu)">{{cmenu.labelKey}}</a>

this is not working in sidebar project because it is in third party library. How i can achieve this? Thanks

user
  • 69
  • 1
  • 3

1 Answers1

0

Try target="_blank" for new tab [routerLink]="['/payment']" target="_blank"

sanjay kumar
  • 838
  • 6
  • 10
  • I dont want to open the link in new tab by default.. and routerLink is not working as it is rendering as a third party component – user Nov 10 '17 at 11:53