【发布时间】:2014-12-05 15:05:45
【问题描述】:
我在表格中有一个表格。
<table class='table table-bordered'>
<caption>ADD NEW BRAND</caption>
<tbody>
<form ng-app="" class="form-horizontal" role="form" name="myForm">
<div class="form-group">
<TR>
<TD>Brand Name</TD>
<TD>
<input type="text" class="form-control" name="name" ng-model="newbrand.Name" placeholder="Enter Brand Name" required>
<span style="color:red" ng-show="myForm.name.$dirty && myForm.name.$invalid">
<span ng-show="myForm.name.$error.required">Brand Name is required.</span>
</span>
</TD>
</TR>
</div>
</form>
</tbody>
</table>
当输入字段为空时,应指示需要品牌名称。但它不起作用。
有人可以帮我解决这个问题吗?
【问题讨论】: