Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app='Test'>
<head>
  <script src="http://code.angularjs.org/1.1.1/angular.min.js"></script>
  <meta charset=utf-8 />
  <title>JS Bin</title>
</head>
<body ng-controller='Ctrl'>
  <div ng-repeat='letter in filteredLetters(letters)'>{{letter.id}}</div>
</body>
</html>
 
angular.module('Test', []);
function Ctrl($scope) {
  $scope.letters = [
    {id: 'a'},
    {id: 'b'},
    {id: 'c'}
  ];
  
  $scope.filterBy = ['b', 'c', 'd'];
  
  $scope.filteredLetters = function () {
    return $scope.letters.filter(function (letter) {
      return $scope.filterBy.indexOf(letter.id) !== -1;
    });
  };
}
Ctrl.$inject = ['$scope'];
Output

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

Dismiss x
public
Bin info
invispro
0viewers