@leugim_ohlavrac wrote:
Hi guys,
How I list all elements of an array? it's only show the last one in my view:
My html:
< ion-item ng-repeat='item in entradas'>
[{{$index}}] - {{item}}
< /ion-item >My .js:
$scope.lista = function () { $scope.entradas = []; window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory, function (fileSystem) { var reader = fileSystem.createReader(); reader.readEntries( function (entries) { for (var i = 0; i < entries.length; i++) { $scope.entradas = [entries[i].name]; console.log($scope.entradas); } }, function (err) { console.log(err); } ); }, function (err) { console.log(err); } ); }
Posts: 2
Participants: 1