Angular JS Action on ng-change the select dropdown
Tengo una tabla simple con tres filas y dos valores para cada fila: fecha y estado:
<tbody>
<tr>
<td>Red</td>
<td class="lastModified">{{item.redDate}}</td>
<td class="status">
<select id ="red" class="form-control" ng-change="update();" ng-model="item.redStatus">
<option value="" disabled="" selected="" class="ng-binding">Please select the value</option>
<option ng-selected="step.value === item.redStatus" ng-repeat="(key, step) in steps">{{ step.title }}</option>
</select>
</td>
</tr>
<tr>Green</tr>
<tr>
....
</tr>
</tbody>
Entonces, valores simples de fecha y estado para rojo, verde y azul. Uno en el menú desplegable - estado, el segundo - solo fecha de salida.
Al cambiar el valor de selección, necesito actualizar la fecha con la fecha de hoy.
`$scope.item.redDate = new Date();`
¿Es posible tener una función comong-change="change();"
No se puede enviar con ng-change la identificación ...