我有一个弹出窗口,调用RESTful后端进行Oauth认证,但返回结果时,它会在弹出窗口中显示JSON而不是关闭弹出窗口并将JSON存储在模型中。我该如何解决?
this.socialLogin = function(provider) {
var url = urlBase + '/' + provider,
width = 1000,
height = 650,
top = (window.outerHeight - height) / 2,
left = (window.outerWidth - width) / 2,
socialPopup = null;
$window.open(url, 'Social Login', 'width=' + width + ',height=' + height + ',scrollbars=0,top=' + top + ',left=' + left);
};