0

Exp is my drop down list which is showing correctly in brower. I want to select expense.expenseType.param as default option in exp select

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.js"></script>
<div ng-repeat="expense in expenses">
  <div>
    expense Type {{exp[0].id}} {{exp[0].param}}<br> expense {{expense.expenseType.id}} {{expense.expenseType.param}}<br/>
    <label>Expense Type <a href="#"  class="label label-primary" ng-click="expenseType = true">add category</a></label>
    <select name="id" ng-model="expense.id" ng-options="e.id as e.param for e in exp track by expense.expenseType.param" class="form-control" ng-required="true">
    </select>
  </div>
</div>

Result while printing is

expense Type 53 zz (showing fist expense type)

expense 39 Shopping

I want to select by default shopping in select option. How to achive this

xrcwrn
  • 5,339
  • 17
  • 68
  • 129

0 Answers0