Angular 2 Routing navigate run in new tab(Use Angular Router naviagte )

CodeMan picture CodeMan · May 25, 2018 · Viewed 23.1k times · Source

How to open a new browser Tab , if using router.navigate .

this.router.navigate([]).then(result => { window.location.href = link; });

Answer

Manish Vadher picture Manish Vadher · May 25, 2018

Try this one.

this.router.navigate([]).then(result => {  window.open(link, '_blank'); });