0

How to use Angular's $window to open multiple links at once? The browser 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'}
    ];
Alyona Yavorska
  • 569
  • 2
  • 14
  • 20
user3522457
  • 2,845
  • 6
  • 23
  • 24

2 Answers2

1

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

Martin
  • 15,820
  • 4
  • 47
  • 56
0

This is not an issue. After dark days when spammers used popups for displaying advertisements, window.open() is blocked.

Pleas read

Community
  • 1
  • 1
Krzysztof Safjanowski
  • 7,292
  • 3
  • 35
  • 47