I have seen enough examples on how to display the limited results using limitTo. But unfortunately it isn't working as expected. Currently, it is displaying the entire list but I want to limit it to only 8 key,value items in 4/4 blocks.
Here is the plnkr.
<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>
Array/array-like, string or number. It does not work with the js object.