Angular BP
Simple boilerplate for AngularJS
by jonva
HTML
<div ng-app="myapp" ng-controller="mycontroller">
<input type="text" ng-model="filterText.name">
<ul>
<li ng-repeat="item in items | filter: filterText">
<span ng-bind="$index"></span>
<span ng-bind="item.name"></span>
</li>
</ul>
</div>
JavaScript
angular.module('myapp', [])
.controller('mycontroller', ['$scope', function mycontroller($scope) {
$scope.items = [{
name: 'john',
email: '[email protected]'
}, {
name: 'amy',
email: '[email protected]'
}, {
name: 'lee',
email: '[email protected]'
}, {
name: 'jack',
email: '[email protected]'
}, {
name: 'lisa',
email: '[email protected]'
}];
}]);