我有一个字段,我希望将其作为表单提交的必填字段。必填表格中的自动完成输入字段
这里是代码:
<div class="form-group">
<form name="addressform">
<span><small><strong> choose Location : </small></strong></span>
<div>
<input type="text" name="address" id="LocationAutocomplete" class="form-control" ng-autocomplete="result1" ng-model="addressTemp" required/>
</form>
<div ng-show="showMap">
<div id="location_map_canvas" style="width:100%;height:200px"> </div>
</div>
</div>
</div>
<div class="form-group">
<input type="submit" ng-submit value="create" ng-disabled="frm.$invalid" class="btn btn-primary btn-block" ng-click="createt()">
</div>
怎么样必需的属性? –
谢谢,我也用@ user7326764没用 – Shiva
先把这段代码放到“form”标签,然后用ng-required =“true” –