6

I have a button and on click of that button a new window should be opened with a new provided URL. For example:

<button class="btn btn-help"(click)="helpWindow($event)" type="submit"></button> 

How do I handle this even at backend in the typescript file? I will get the URL from REST API and I want to open a new window with that link

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Protagonist
  • 1,649
  • 7
  • 34
  • 56

1 Answers1

12
helpWindow(event) {
  window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');
}

See also https://stackoverflow.com/a/14132265/217408

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567