Angular comes with a limitTo:limit filter, it support limiting first x items and last x items:
<div ng-repeat="item in items|limitTo:4">{{item}}</div>
More Related Contents:
- Passing data between controllers in Angular JS?
- How do I share $scope data between states in angularjs ui-router?
- AngularJS – How to use $routeParams in generating the templateUrl?
- How to get evaluated attributes inside a custom directive
- How to pass an object into a state using UI-router?
- How to detect browser back button click event using angular?
- AngularJS browser autofill workaround by using a directive
- Initializing select with AngularJS and ng-repeat
- Watch multiple $scope attributes
- External resource not being loaded by AngularJs
- How can I make an AngularJS directive to stopPropagation?
- How to use jQuery in AngularJS
- Print Html template in Angular 2 (ng-print in Angular 2)
- How to set expiration date for cookie in AngularJS
- Error: [ng:areq] from angular controller
- Angularjs: Error: [ng:areq] Argument ‘HomeController’ is not a function, got undefined
- Error: [ngModel:datefmt] Expected `2015-05-29T19:06:16.693209Z` to be a date – Angular
- Consider marking event handler as ‘passive’ to make the page more responsive
- AngularJS : Asynchronously initialize filter
- VueJs templating. How to load external templates
- Format Date time in AngularJS
- How to create a custom input type?
- Using page’s angular JS in chrome extension
- Show pop-ups the most elegant way
- Angularjs – simple form submit
- AngularJS: lazy loading controllers and content
- Is it a bad practice to use jQuery in Angular? [closed]
- Rename Object Key in an array using javascript
- Function Called Multiple Times in AngularJS Repeat Section
- Decode HTML entity in Angular JS