angularjs的可编辑表格
问题描述:
我有一个可编辑的表格它工作正常,但我必须隐藏可编辑的行,并显示在按钮上点击 例如。我怎么能做到这一点?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();”' –
完成了,但仍然没有隐藏 –
检查控制台,可能有语法错误。我在我的项目中使用它。 –