How to open a new window to open with a click button in Angular 2

I have a button, and when I click this button, a new window should open with the new URL provided. For instance:

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

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

+6
source share
1 answer
helpWindow(event) {
  window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');
}

See also fooobar.com/questions/88926 / ...

+12
source

Source: https://habr.com/ru/post/1665501/


All Articles