AngularJS application freezes during request

I am running an Angular application with a Parse backend. When I make a request, the application freezes, even if the DOM is not dependent on the data that it was capturing at that time. That is why this answer was not very useful. Is there a way to get the rest of the application to work while any request is being executed?

Below is the code that freezes everything until the request is resolved. Parse Javascript SDK comes with promises, which returns QS.errorQuery.find () `.

function get() {

        var queries = [
            QS.errorQuery.find(),
            QS.resLogQuery.find()
        ];

        return $q.all(queries)
            .then(function(res) {
                return {
                    errors: res[0],
                    logs: res[1]
                }; //end return
            }); //end return
    }; //end get

    get().then(function(res) {
        $scope.lineData = DP.bigLineParser(res.errors, res.logs);
    });
+4
source share
1 answer

async, , . , , , Parse .

+2

Source: https://habr.com/ru/post/1542371/


All Articles