小编Jon*_*wak的帖子

错误:SyntaxError:DOM异常12 setRequestHeader @ [本机代码]

我正在使用Phonegap和AngularJS,CORS_REST开发Android和IOS的移动应用程序.我几乎掌握了Android上标题的所有功能.在使用GapDebug在iPhone上进行测试时.

以下是身份验证代码的示例:

$http.post('someurlhere', {username: username, password: password})
                        .then(function (response) {
                            if(!response.IsAuthenticated) {
                            alertsManager.addAlert('Username or password is incorrect', 'alert-danger');
                        }
           callback(response);
                         console.log(response);
        });
Run Code Online (Sandbox Code Playgroud)

我得到一个错误:

SyntaxError:DOM异常12_IMG

如果有人能请求帮助我会非常感激.

谢谢:

iphone http-headers cors angularjs

7
推荐指数
1
解决办法
2634
查看次数

标签 统计

angularjs ×1

cors ×1

http-headers ×1

iphone ×1