<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="Scripts/angular.js"></script>
<script>
var app = angular.module('myApp', []);
app.controller('MyCtrl', function($scope)
{
$scope.options = [
{
id: 1,
name: 'Value',
desc: 'Test'
},
{
id: 2,
name: 'Foo',
desc: 'Bar'
}];
$scope.selectedOption = 2;
})
</script>
</head>
<body ng-app="myApp" ng-controller="MyCtrl">
<div>
<select ng-model="selectedOption" ng-options="o.id as o.name + ' (' + o.desc + ')' for o in options"></select>
</div>
</body>
</html>This code snippet is for ng-options compound text of option in AngularJS.