Reputation: 1994
I want to show spaces in the div options which I am appending multiple properties. The spaces are not shown. Below is my code
<select id="sel" class="input-block-level" ng-model="list_category" ng-options="obj.id as (obj.name + ' ' + obj.id) for obj in list_categories.data">
<option value="">Other</option>
</select>
var app = angular.module('app', []);
function Ctrl($scope) {
$scope.list_categories = {
data: [{
id: 'id1',
name: 'name1'
}, {
id: 'id2',
name: 'name2'
}]
};
$scope.list_category = 'id2';
}
The spaces are not showing up if i append + ' ' + Should i add any CSS for this ??
Upvotes: 1
Views: 76