0
I would like to show the database information, is pulling the information correctly,and it is shown in the console that there is an array of 35 items to be shown but I am not able to display them in html.
<div ng-app="Chamados" ng-controller="Chamando">
<table>
<tr ng-repeat="chamado in CHAMADOS">
<td>{{chamado.STATUS}}</td>
</tr>
</table>
<script>
var app = angular.module("Chamados", []);
app.controller("Chamando", function($scope, $http) {
$http.get('caminhodoBanco'/*, JSON.stringify(data)*/).then(function (response) {
$scope.chamados = response.data.records;
}, function (response) {
});
});
</script>
This in high box
CHAMADOS
instead of low, as is on the line$scope.chamados
but you could edit your question and really explain your difficulty, because this vacancy, can not know exactly your problem.– NoobSaibot
Still hasn’t changed in nadakkk
– Thiago Luiz Ferreira Tavares
See what’s returning on
Console
, you are trying to return the information directly from Database ?– NoobSaibot
{CALLS: Array(35)}
– Thiago Luiz Ferreira Tavares
it can take the database information, but I can’t display it in html
– Thiago Luiz Ferreira Tavares
Below the line
$scope.chamados =
makes aconsole.log($scope.chamados);
– NoobSaibot
did not show any change
– Thiago Luiz Ferreira Tavares
Actually we want to know what’s the exit from
console.log
, will not present any difference @Thiagoluizferreiratavares. You can show us what was the exit, or the exitresponse.data.records
?– BrTkCa
{CALLED: Array(35)} CALLED : (35) [{... }, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
proto : Object
– Thiago Luiz Ferreira Tavares
Try this @Thiagoluizferreiratavares:
$scope.chamados = response.data.records.CHAMADOS;
– BrTkCa
Tried and gave this on the console @Lucas Costa
– Thiago Luiz Ferreira Tavares
Typeerror: Cannot read Property 'CHAMADOS' of Undefined at historico:66 at angular.js:16832 at m.$Digest (angular.js:17971) at m.$apply (angular.js:18269) at l (angular.js:12387) at Xmlhttprequest.A.onload (angular.js:12541) "Possibly unhandled rejection: {}"
– Thiago Luiz Ferreira Tavares