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,438
  • 68
  • 55
  • 126
Protagonist
  • 1,559
  • 7
  • 33
  • 51

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
  • 558,509
  • 191
  • 1,911
  • 1,506