我有一个下拉列表,其选项值可能包含我想保留的额外空白。但是看起来当选项被渲染时,空白被修剪掉了。
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.names = ["aaa bbbb cc", "aa d d bb nn","xxx zzz yyy"];
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<p id="demo"></p>
<select id="mySelect" >
<option ng-repeat="letter in names">{{letter}}</option>
</select>
</div>