Hey there, I'm currently having an issue with printing a list where each entry is supposed to follow the format "element X of TOTAL". However, instead of displaying the total value, it appears as blank text. It seems like a simple mistake, but for some reason, I can't seem to pinpoint what's causing it.
<li ng-repeat="elem in lista" ng-show="check">
Element {{elem.item}} of {{len}}
<button ng-click="remove(elem)">Remove</button>
</li>
I also have the following code snippet from my app.js file that contains my controller:
$scope.lista = [
{ item: 'one' },
{ item: 'two' },
{ item: 'three' }
];
var len = $scope.lista.length;