See Below Code:
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("http://www.w3schools.com/angular/customers.php")
.then(function (response) {
$scope.names = response.data.records;
});
});
In above Example We wrote the code for getting all data in records are stored in names but the requirement is first 5 data should be stored in names.
Thanks in advance