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

后端 未结 5 1374
我在风中等你
我在风中等你 2021-01-01 17:51

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

this.router.navigate([]).then(result => { window.location.href = link; });
5条回答
  •  独厮守ぢ
    2021-01-01 17:59

    Try this one.

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

提交回复
热议问题