UNPKG

angular-material-npfixed

Version:

The Angular Material project is an implementation of Material Design in Angular.js. This project provides a set of reusable, well-tested, and accessible Material Design UI components. Angular Material is supported internally at Google by the Angular.js, M

15 lines (14 loc) 588 B
angular .module('selectDemoSelectHeader', ['ngMaterial']) .controller('SelectHeaderController', function($scope, $element) { $scope.vegetables = ['Corn' ,'Onions' ,'Kale' ,'Arugula' ,'Peas', 'Zucchini']; $scope.searchTerm; $scope.clearSearchTerm = function() { $scope.searchTerm = ''; }; // The md-select directive eats keydown events for some quick select // logic. Since we have a search input here, we don't need that logic. $element.find('input').on('keydown', function(ev) { ev.stopPropagation(); }); });