Home
Tutorials
Microsoft Technologies Tutorials
Java Programming Tutorials
Web Designing Tutorials
Script Programming Tutorials
Database Programming Tutorials
Mobile Technologies Tutorials
Other Programming Tutorials
Examples
Articles
Tools
News
AngularJS Limitto Filter Example
Keywords : Angularjs limit number of elements example, Angularjs limitto filter to limit elements displaying example, Angularjs filter to limit number of elements example
Example
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> AngularJs limitTo Filter to Limit Number of Elements </title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script> var app = angular.module("AngularfilterApp", []); app.controller("filterctrl", function ($scope) { $scope.samarry = [20, 10, 43, 5, 1, 4, 6] $scope.samstr = "tutlane.com"; }); </script> </head> <body ng-app="AngularfilterApp"> <h2>AngularJS Limitto Filter Example</h2> <div ng-controller="filterctrl"> Default Array : {{samarry}}<br /><br /> LimitTo Get Elements from Beginning:{{samarry | limitTo : 3}}<br /><br /> LimitTo Get Elements from Ending:{{samarry | limitTo : -3}}<br /><br /> Get Elements from String : {{samstr | limitTo : 4}} </div> </body> </html>
Click Here to See Result
Result
Previous
Next