javascript - 使用 angularjs 编辑表单

标签 javascript html angularjs

我有一个可编辑的表格 enter image description here它工作正常,但我必须隐藏可编辑行并在单击按钮时显示该行 例如。我怎样才能做到这一点?

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

最佳答案

你应该使用angular-xeditable ,使用它您将能够创建表可编辑列可编辑行可编辑表

关于javascript - 使用 angularjs 编辑表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35744386/

相关文章:

javascript - JS : Show/hide text field depending on radio button issue

html - 我可以在 View 之外启动 webview,抓取 html 并通过它发布表单吗?

AngularJS datepicker ui-date 错误更新

javascript - 使用键数组过滤对象数组[逆]

javascript - 关闭 JavaScript 确认弹出窗口而不单击确定或取消按钮

javascript - 在 Angular 1.x 中调用方法/触发子组件上的操作

html - 提交按钮和输入在 Bootstrap 4 中具有不同的宽度

javascript - Bootstrap 文本区域在 Firefox 中呈现奇怪且丑陋的效果

javascript - 使用 javascript 随机更改表格的背景颜色

Angularjs:如何使用 ui-router 重新加载或刷新 ui-view