Run javascript at the end of a call to webapi

0

I get a list of objects from a webapi with visual studio, and I take it like this:

$http.post('/sistema/api/Persona/Search', param).then(function (data) {
                //alert(data);
                return genericSuccess(data);
            })

function genericSuccess(data) {            
            $scope.listadoPersonas = data.data;
});

To that list I use in the view and with an ng-repeat I print it in a table, what I need is once the ng-repeat is executed, to that list I apply a javascript function, but I always get an error because when I want to apñlicale the javascript function going through the id of the div that I am generating, it tells me that the $ scope.listadpPersonas list does not exist. Try with

angular.element(document).ready(function () {

But nothing, how can I do? I have to make a promise and execute it when I finish? How do I do this?

thanks

    
asked by Lucho 07.05.2018 в 21:33
source

0 answers