0

I have created the dropdown which has 2 values: 1) Value1 2) Value2

I want to select Value1 as the default value in dropdown. I have created the following but it is only hard coding the Value1 and not redirecting to Value1

<div class="col-md-4" style="margin-right:10px;">
    <button class="btn btn-default dropdown-toggle" type="button"
            id="dropdownMenu1" data-toggle="dropdown"
            aria-haspopup="true" aria-expanded="true">
        Value1
        <span class="caret"> </span>
    </button>
    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1" ng-model="auditToggle">
        <li><a ng-click="methodName('/method1')">Value1</a> </li>
        <li><a ng-click="methodName('/method2')">Value2</a> </li>
    </ul>
</div>
georgeawg
  • 48,608
  • 13
  • 72
  • 95
meallhour
  • 13,921
  • 21
  • 60
  • 117

1 Answers1

0

Try

<li [value]="'Value1'"><a ng-click="methodName('/method1')">Value1</a> </li>
<li [value]="'Value2'"><a ng-click="methodName('/method2')">Value2</a> </li>
Dulanjaya Tennekoon
  • 2,408
  • 1
  • 18
  • 31