窗口中打开阻止弹出多个环节

窗口中打开阻止弹出多个环节

本文介绍了$窗口中打开阻止弹出多个环节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用角度的$窗口同时打开多个链接?该broswer似乎阻止弹出,有没有任何地方来克服问题?

  $ scope.links = [
    {'链接':'www.google.com'},
    {'链接':'www.yahoo.com},
    {'链接':'www.bing.com'}
    ];


解决方案

所以,是的。问题是,这些窗口被打开到另一个域 - 这样的浏览器将阻止窗口。解决的办法是在您的域名的网页,打开窗口,并通过你想去,然后URL有页面重定向到该页面。

how to use angular's $window to open multiple links at once? The broswer seem to block the pop up, is there anywhere to overcome that issue?

http://plnkr.co/edit/m8m2I9dqE2kF1H1nzxJT?p=preview

  $scope.links = [
    {'link':'www.google.com'},
    {'link':'www.yahoo.com'},
    {'link':'www.bing.com'}
    ];
解决方案

So yes. The problem is that the windows are being opened to another domain -- so the browser will block the windows. The solution is to open the window at a page in your domain, and pass the url you want to go to and then have that page redirect to the page.

http://plnkr.co/edit/nAfQ4oHyCC22oSCFqMpH?p=info

这篇关于$窗口中打开阻止弹出多个环节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 23:55