8

3 つの行と各行に 2 つの値 (日付と状態) を持つ単純なテーブルがあります。

<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>

したがって、赤、緑、青の単純な日付とステータスの値です。ドロップダウンの 1 つ - ステータス、2 つ目 - 日付を出力するだけです。

選択値を変更すると、日付を今日の日付で更新する必要があります。

 `$scope.item.redDate = new Date();`

ng-change="change();" Can't send with ng-change the ID... のような機能を1つ持つことは可能ですか?

4

1 に答える 1