0

I am trying to open a URL in new window by clicking on menu item in angular but I don't know a method of doing such thing in _nav.ts file. Below is the code of my menu item

    {
        name: 'Power BI',
        url: "window.open('www.google.com', '_blank')",
        icon: 'fa fa-archive',
        version: '0.0.1',
        key: 'VIEW_EXTERNAL_POWERBI',
    }

Please help me out how to achieve this thing.

*Note: I want to open link in new window instead of new tab.

Thank you

0

1 Answer 1

0
<button (click)="handleClick()" >click</button>

handleClick(){const url = 'https://www.google.com';
window.open(url, '_blank');}

TRY THIS

Sign up to request clarification or add additional context in comments.

1 Comment

I know how to open it with a button. I need to do it on menu click in nav.ts file

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.