Answer the question
In order to leave comments, you need to log in
AngularJS how to make unique buttons in ng-repeat?
Hello everyone, I continue to comprehend zen with AngularJS. The problem is the following, I have a list of orders at the end of each order, there is an order status button, everything looks like this.
When the state of one order changes, all buttons change. The question is how to identify the button, with the following markup code
<tr ng-repeat="product in admin.listProduct">
<td>{{product.name}}</td>
<td>{{product.email}}</td>
<td>{{product.amount}}</td>
<td>{{product.price}}</td>
<td ng-switch on="admin.flag">
<button type="button" ng-switch-when="0" ng-click="admin.flag=1" class="btn btn-success">Confirm</button>
<button type="button" ng-switch-when="1" ng-click="admin.flag=2" class="btn btn-primary">Send</button>
<button type="button" ng-switch-when="2" ng-click="admin.delete(order)" class="btn btn-danger">Complete</button>
</td>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question