My code snippet is currently displaying null for the card_id, but I want to ensure that the id and is_default card are displayed on top. How can I achieve this? Whenever I use ng-click, the result displayed is as shown below. My goal is to obtain the selected card_id.
<select ng-model="approvedinvoicesCtrl.currentcard.card_id" >
<option ng-value="item.card_id"
ng-repeat="item in approvedinvoicesCtrl.current_job.cards"
ng-selected="item.is_default">{{item.brand +' '+ item.last_digits}}
</option>
</select>
Result:
card_id: "",
charge_description: "ff",
charge_type: "Credit Card Payment"