简体   繁体   English

角梦工厂,错误400(错误请求)ionic.bundle.js:18526

[英]Angular-dreamfactory, error 400 (Bad Request) ionic.bundle.js:18526

I am using ionic in my project which about to complete, but i get strange type of response from angular-dreamfactory. 我在即将完成的项目中使用了ionic,但是我从angular-dreamfactory那里得到了奇怪的响应。 On authentication process, i send http request to dsp which is in our server, for getting data from api services. 在身份验证过程中,我将http请求发送到我们服务器中的dsp,以从api服务获取数据。 All works well, even i can see the response body in chrome tool, but the function 一切正常,即使我可以在chrome工具中看到响应正文,但该功能

  `DreamFactory.api.user.login(postData,
    function (data) {
        UserService.setUser(data);
        $scope.mediaLoading(2);
        $rootScope.$broadcast('user:loggedIn');
        $scope.loginModal.hide();
        //insert other request for data to fill app
    },
    function (errors) {
    alert("in errors");
        if (errors.error[0].code != 400) {

            $scope.mediaLoading(2);
              ... '

when a user enters incorrect login, it fails properly, but in second attempt in just stops responding in the app inside DreamFactory.api.user.login(postData,..) and doesnt seem to come out. 当用户输入错误的登录名时,它会正常失败,但是第二次尝试只是停止在DreamFactory.api.user.login(postData,..)内的应用程序中响应,并且似乎没有出现。 For reference: __in 1st attempt console gives: POST http://dsp.oshno.tj:7070/rest/user/session 400 (Bad Request) dsp.oshno.tj:7070/rest/user/session:1 // as expected __in 2nd attempt: http://domain_name/rest/user/session 400 (Bad Request) ionic.bundle.js:18526 // and then hangs in that function //not expected 供参考:__in第一次尝试控制台给出:POST http://dsp.oshno.tj:7070/rest/user/session 400(错误请求)dsp.oshno.tj:7070/rest/user/session:1 //作为预期在第二次尝试中__: http:// domain_name / rest / user / session 400(错误请求)ionic.bundle.js:18526 //然后挂在该函数中// //意外

Please, anybody help on injecting DreamFactory properly ???? 请,有人帮助正确注入DreamFactory吗???

万一任何人都有类似的问题,我可以使用Javascript SDK代替AngularJS来部分解决,因为后来我在git hub中意识到AngularJS比Javascript过时了,因此仅通过创建一个.factory服务来提供工作功能。返回window.df对象,并且效果很好:),这里是DreamFactory api的javascript sdk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Angular中的Ionic Pubnub聊天:ionic.bundle.js:21157 TypeError:PubNub.publish不是函数 - Ionic Pubnub chat in Angular: ionic.bundle.js:21157 TypeError: PubNub.publish is not a function ionic.bundle.js分解为单独的导入 - ionic.bundle.js break down into separate imports 图像url angular js中的400(错误请求) - 400 (Bad Request) in image url angular js Ionic + LokiJS总是产生“ ionic.bundle.js:26794 TypeError:无法读取未定义的属性”插入”” - Ionic +LokiJS always produces “ionic.bundle.js:26794 TypeError: Cannot read property 'insert' of undefined” ionic.bundle.js:25642错误:[ngRepeat:iexp]期望的表达式形式为“ _collection _ [_ id_]中的_item_”,但得到了“ cdata.catagoriesdata” - ionic.bundle.js:25642 Error: [ngRepeat:iexp] Expected expression in form of '_item_ in _collection_[ track by _id_]' but got 'cdata.catagoriesdata' 400(错误请求)错误 - 400 (Bad Request) error 使用angular js和REST Web服务的PUT错误400错误请求 - PUT Error 400 bad request using angular js and REST web services Laravel/angular - 400 错误请求 - Laravel/angular - 400 bad request Passport local 使用 Angular 返回错误 400 错误请求 - Passport local returns error 400 bad request with Angular NetworkError:400错误请求离子框架 - NetworkError: 400 BAD REQUEST ionic framework
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM