gpt4 book ai didi

angular - 使用路由在 Angular 6 中打开新的浏览器窗口

转载 作者:行者123 更新时间:2023-12-03 12:43:23 26 4
gpt4 key购买 nike

I am trying to open a new browser window for Angular 6 SPA.



首先,我尝试使用 window.open(urlNavigate, 'Auth window', 'height=800,width=500')
但是尽管为窗口指定了 url,但它正在重定向到 index.html。

在某处我发现使用 Electron 模块可以用于相同的。

引用: https://github.com/maximegris/angular-electron/issues/58

使用它我面临以下错误:

enter image description here

我已经尝试了很多解决方案来解决这个错误,但我做不到。

“是否有任何替代选项可以使用 route 以 6 Angular 打开新的浏览器窗口?”

最佳答案

试试这个

window.open("https://www.google.com", "_blank"); // Open new tab
window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes'); // Open new window

关于angular - 使用路由在 Angular 6 中打开新的浏览器窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57148481/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com