Angular.js ng-repeat filter by property having one of multiple values (OR of values)

Best way to do this is to use a function: <div ng-repeat=”product in products | filter: myFilter”> $scope.myFilter = function (item) { return item === ‘red’ || item === ‘blue’; }; Alternatively, you can use ngHide or ngShow to dynamically show and hide elements based on a certain criteria.

angularjs force uppercase in textbox

Please see the other answer below, which is superior to this one. this answer is based on the answer here: How to autocapitalize the first character in an input field in AngularJS?. I’d imagine that what you’d want would be a parser function like this: angular .module(‘myApp’, []) .directive(‘capitalize’, function() { return { require: ‘ngModel’, … Read more