I've been exploring different ways to limit the results using limitTo
, but unfortunately, I'm encountering unexpected issues. Currently, the entire list is being displayed when I only want to show 8 key-value items in a 4/4 block format.
You can check out the code on this plnkr link.
<ul>
<li ng-repeat="(key,value) in stocks |limitTo :8">
{{key +" "+ value}}
</li>
</ul>
<script>
var app = angular.module('smallcaseApp', []);
app.controller('stockCtrl', function($scope, $http) {
$http.get("data.json").then(function(response) {
$scope.stocks = response.data.price;
});
});
</script>