简体   繁体   English

如何在angular6中打开新窗口

[英]How to open new window in angular6

How to open new window in angular6 如何在angular6中打开新窗口

if (window.navigator && window.navigator.msSaveOrOpenBlob) {
    window.navigator.msSaveOrOpenBlob(objectUrl, filename);
    let opner = window.open(objectUrl,`enter code here` '_blank', 'height=700,width=700');
} 

How to open in new window in angular 6 . 如何在新窗口中打开角度6。 its working fine in Chrome but not Internet Explorer. 在Chrome浏览器中工作正常,但在Internet Explorer中无法正常工作。

window.open(“ http://google.com ”,'文本示例','height = 700,width = 700');

IE will fail if there are spaces or "-" in the second parameter. 如果第二个参数中包含空格或“-”,则IE将会失败。 So, remove the spaces and try this: 因此,删除空格并尝试以下操作:

window.open(objectUrl, 'enter_code_here', 'height=700, width=700');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM