In our application, on a button click within a table, I need to open a new tab containing details of a record in the table. Using the below code I am navigating to a new URL. On the new page, resolvers are used to fetch details from back-end. Now the problem is I want to open this in a new tab.
this.router.navigate(['/url/test'], {
queryParams: {ip},
});
I tried the below code. But it doesn't seems to work. It is redirecting to the default URL:
this.router.navigate([]).then((result) => {
window.open('/url/test?aa=' + aa, '_blank');
});
Any help would be appreciated.
routerto open a window. Remove the call torouter.navigateand just callwindow.open.