Can you traverse the fix of a Rest API with a foreach to get a field in a table specific in angularjs?

0

This is the code that I have until now.

app.controller('obtener', ['$scope', '$http', function($scope, $http){
    $http.get('http://192.168.1.31:8090/api/ITRH_REQUISITION/').then(function(resolve){
        $scope.nombres = resolve.data
        console.log(resolve.data)
        insertar2()
    },function(reject){

    })

    $scope.insertar = function(){

        angular.forEach($scope.nombres,function(item){
                if($scope.selectedName == item.ID)
                    $scope.valor = item;
        })
    
asked by MarioxSeg 07.11.2018 в 14:51
source

0 answers