How do I Print Result of a Parse.Query in a View?

0

I have the following situation in View :

  

{{nomeCraque}}

and no Angular :

$scope.nomeCraque = {};
var EscalacaoObject = Parse.Object.extend("Escalacao");
var query = new Parse.Query(EscalacaoObject);
query.find({   
          success: function(results) {
          // Successfully retrieved the object.

          for (var i = 0; i < results.length; i++) {
            var object = results[i];
            $scope.nomeCraque = object.get("nomeCraque");
          }

        },
        error: function(error) {
        alert("Error: " + error.code + " " + error.message);
        }
  })              

In this way $scope.nomeCraque prints {} on View , how do I print on View the correct result that Query is returning?

    
asked by anonymous 10.03.2017 / 14:23

1 answer

0

Felipe, thank you very much for your help so far, in this final part I discovered what was missing, here is the treatment I did in my angular code: $ scope.nameCraque = {name: object.get (" )}; $ scope. $ apply (); NOW IT'S WORKING AS I WOULD DESIRE !, OR BE, THE RESULT OF PARSE.QUERY IS BEING DISPLAYED ON THE VIEW! Thanks everyone for the support!

    
11.03.2017 / 17:09