Fancy select dropdown
//javascript
controller('ExampleController', function ($scope) {
$scope.options = [{
name: 'Blue',
hexCode: '#0000ff'
},{
name: 'Red',
hexCode: '#C41A16'
},{
name: 'Purple',
hexCode: '#AA0D91'
}];
$scope.selectedValue;
});
//html
<select-box ng-model="selectedValue" opt-exp="t.name for t in options"></select-box>
You can use the label
attribute to define a default label before any values are selected
<select-box ng-model="selectedValue" opt-exp="t.name for t in options" label="Select One"></select-box>