I have an object as below. I have to display this as a drop-down. I tried this but not working
HTML
<div ng-app="app">
<div ng-controller="MyCntrl">
<ul class="unstyled">
<li class="dropdown" ng-repeat="p in people">
{{Slected value}} <a href="#" class="dropdown-toggle" data-toggle="dropdown"><b class="caret"></b></a>
<ul class="dropdown-menu">
<li>{{p.color}}</li>
</ul>
</li>
</ul>
</div>
</div>
JS
var app = angular.module('app', []);
app.controller('MyCntrl', ['$scope', function($scope) {
$scope.people = [{
id: 1,
color: 'blue',
gender: 'male'
}, {
id: 2,
color: 'red',
gender: 'female'
}, {
id: 3,
color: 'red',
gender: 'male'
}];
}]);
Fiddle : http://jsfiddle.net/ywkLt/210/
Dropdown is not showing up. I am new to this can anyone help me.
Edit:
I want to display selected value and followed by caret icon for dropdown. Like this : http://jsfiddle.net/qWzTb/3577/
But here I need caret icon. When I click on that, it has to display options.
<select></select>?