I have code like this:
window.open(\'https://api.instagram.com/oauth/authorize/\',
\'_blank\',
\'width=700,height=500,toolbar=0,menubar=0,location=0,status=1
var newTab = $window.open('', '_blank');
promise
.then(function () {
var url = '...';
newTab.location.href = url;
});
The promise fires in response to you getting the HTTP response back from the Ajax request. That isn't a user triggered event, so popups are blocked. Use the window the user gives you instead of creating a new one.
The solution I use to this problem is to
win.location
)