我创建了一个工作表单,放置在表格下方的 div 中;
<div class="row">
<form class="form-signin" ng-submit="controller.add.save()">
<h2 class="form-signin-heading">Add an item:</h2>
<label for="inputName" class="sr-only">Name</label>
<input type="text" name="name" id="inputName" class="form-control" placeholder="Name" required autofocus ng-model="controller.add.name">
<label for="inputDescription" class="sr-only">Description</label>
<textarea name="description" id="inputDescription" class="form-control" placeholder="Description" ng-model="controller.add.description">
</textarea>
<button class="btn btn-lg btn-primary btn-block" type="submit">Add</button>
</form>
</div>
然后我决定把表格移到上面的表格中;
<tr>
<form ng-submit="controller.add.save()">
<td>Add an item</td>
<td><input type="text" name="name" id="newName" class="form-control" placeholder="Name" required ng-model="controller.add.name"></td>
<td><textarea name="description" id="newDescription" class="form-control" placeholder="Description" ng-model="controller.add.description"></textarea></td>
<td><button class="btn btn-xs btn-primary" type="submit">Add</button></td>
</form>
</tr>
但是现在表格不再起作用了。我究竟做错了什么?