I'm trying to render a list from my JsonResult Controller. It's ok, I receive data in my Angular service, but a in trouble to render it in a list using ng-repeat. It´s renders a big empty list. When the data is not a list, it´s works.

Angular. Debug

var app = angular.module('FileApp', []);        
app.service('ngFileService', function ($http) {        
  this.getFileByFileCode = function (fileCodigo) {
    var response = $http.get("/Files/GetFile?fileCodigo=" + fileCodigo);
    return response;


app.controller('ngFileController', function ($scope, ngFileService) {                
  $scope.filterFileCode = "";

  $scope.getFilteredFile = function () {
    var promise = ngFileService.getFileByFileCode($scope.filterFileCode);
    promise.then(function (resp) {
      $scope.File = resp.data;       
      $scope.Message = "Call is Completed Successfully";
    }, function (err) {
      $scope.Message = "Call Failed " + err.status;


          <td>Enter Search Value:</td>
          <td><input type="text" ng-model="filterFileCode" class="form- 
         control" ng-change="getFilteredFile()" /></td>
      <table class="table table-bordered table-condensed table-striped">
            <th>Documentos Gerais File</th>
          <tr ng-repeat="f in File">


I expect to render a list of boolens values.

**DataCriacao: "/Date(-62135596800000)/"
DataFim: "06/07/2018"
DataInicio: "26/06/2018"
DescricaoServico: null
FileCOM: (2) [true, false]
FileCTB: (2) [false, false]
FileCodigo: 190562
FileCodigoId: 0
FileCodigoNv: null
FileMimeType: null
FileSite: (2) [false, false]**

[SOLVED] I find de solution making the above solution:

    <td><span ng-repeat="(key, value) in File.FileCTB track by $index"> 
    <td><span ng-repeat="(key, value) in File.FileCOM track by $index"> 
    <td><span ng-repeat="(key, value) in File.FileSite track by $index"> 

0 Answers