December 2014
Intermediate to advanced
346 pages
6h 14m
English
Search filters serve to evaluate individual elements in an enumerable object and return whether or not they belong in the resultant set. The returned value from the filter will also be an enumerable set with none, some, or all of the original values that were removed. AngularJS provides a rich suite of ways to filter an enumerable object.
Search filters return a subset of an enumerable object, so prepare a controller as follows, with a simple array of strings:
(app.js)
angular.module('myApp', [])
.controller('Ctrl', function ($scope) {
$scope.users = [
'Albert Pai',
'Jake Hsu',
'Jack Hanford',
'Scott Robinson',
'Diwank Singh'
];
});The default search filter is used in the template in the same ...
Read now
Unlock full access