Let see my Angularjs code:
My function 'getequipselected' from my 'EmpApi' factory request data of my webservice and save it in response:
EmpApi.getequipselected(idequip).success(function (response) {
$scope.editequipamento = response;
console.log(response);
Its perfectly working, it printed on console log browser: Array [ Object ]
If a click on 'Objetc', I can see all parameters: idEquipamento, TAG, idDiretoria, idFabricante ...
So i trieded to print the $scope:
console.log($scope.editequipamento);
I printed it to check, it was the same of console.log(response)
The problem is here: I tried to print it:
console.log($scope.editequipamento.TAG);
I tried to print one parameter from object but in gave me 'undefined'
I trieded it because I'd like to pass this value to my html input, using ng-model="editequipamento.TAG", but the input is also undefined.