Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta name="description" content="Camp NG Example 0" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body ng-controller="FruitCtrl as ctrl">
  
  
  <input ng-model="ctrl.searchFruit" />
  <ul>
    <li ng-repeat="fruit in ctrl.fruits | filter:ctrl.searchFruit">{{fruit.name}}</li>
  </ul>
  <ul>
    <li ng-repeat="fruit in ctrl.fruits | limitTo:2">{{fruit.name}}</li>
  </ul>
  
  <ul>
    <li ng-repeat="fruit in ctrl.fruits | orderBy:'-name'">{{fruit.name}}</li>
  </ul>
</body>
</html>
 
var app = angular.module("app", []);
app.controller("FruitCtrl", function() {
  this.fruits = [{name: "Bananas"}, {name: "Canteloupe"}, {name: "Cherries"}, {name: "Strawberries"}, {name: "Tomatoes"}];
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
gaslightpro
0viewers