0
我有一個可編輯的表格它工作正常,但我必須隱藏可編輯的行,並顯示在按鈕上點擊 例如。我怎麼能做到這一點?angularjs的可編輯表格
<td contenteditable='true'>
<label class="text">
<input type="text" ng-model="medication.description" ng-change="editMedication(medication)"/>
{{medication.description}}
</td>
<td>
<label for="edit">
<input type="button" id = "edit" ng-model="medication" ng-change="editMedication(medication)" >
</label>
</td>
</tr>
</table>
加上'NG-IF = 「_ show_editable_row ==真正的」'中的標記,並在控制器添加'$ scope.show_editable_row = function(){$ scope._show_editable_row = true; ''。在按鈕上添加'ng-click =「show_editable_row();」' –
完成了,但仍然沒有隱藏 –
檢查控制檯,可能有語法錯誤。我在我的項目中使用它。 –