I have an angular 5 component that needs to open a link in new tab, I tried the following:
page link>
Some browser may block popup created by window.open(url, "_blank");.
An alternative is to create a link and click on it.
...
constructor(@Inject(DOCUMENT) private document: Document) {}
...
openNewWindow(): void {
const link = this.document.createElement('a');
link.target = '_blank';
link.href = 'http://www.your-url.com';
link.click();
link.remove();
}