AngularJS Bug? - Select Multiple - Dynamically set size dependent on number of options
问题 I want to dynamically control the size of a multi-select. html <select class="form-control" ng-model="formData.selected_tests" ng-options="c.test for c in tests" multiple="true" ng-multiple="true" name="tests" id="tests" size="{{ tests.length }}" ng-size="{{ tests.length }}"> </select> js $http({ method: 'GET', url: '/api/v1/test' }) .success(function(data, status, headers, config) { $scope.tests = data; }) .error(function(data, status, headers, config) {}); Output from inspect element