0
votes

In my requirement Initially it will show only search button not drop-down. Now, I need to show select list option directly when user click on search button instead of clicking on drop-down list. So I can get options when I click on search button and I can select any of them and once selected one option need to show another drop-down. Here is my code
<a><button>search</button></a> <select><option value="">A</option><option value="">B</option> <option value="">C</option> <option value="">D</option> </select>

here is fiddle http://jsfiddle.net/8bhvhq62/3/.

1

1 Answers

2
votes

You could use ng-disabled directive here which would enable and disable the dropdown

Markup

<a><button ng-click="enabled=true">search</button></a>

<select ng-model="test" ng-disabled="!enabled">
    <option value="">A</option>
    <option value="">B</option>
    <option value="">C</option>
    <option value="">D</option>
</select>
<select ng-model="test1" ng-disabled="!enabled">
    <option value="">1</option>
    <option value="">2</option>
    <option value="">3</option>
    <option value="">4</option>
    <option value="">5</option>
</select>

Fiddle Here