【发布时间】:2017-04-06 00:42:21
【问题描述】:
我是 angularjs 的新手,正在尝试在 google API 示例上实现角度验证 `
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform
当我输入地址时,它会自动填写州、市和县,但 angularjs 仍然给我错误,提示需要城市、州和国家,但这些数据已由 google api 自动填写
Angular 验证码是
<div class="col-md-3">
<label for="email" class="control-label">*City:</label>
<span class="help-block" ng-show="form.city.$invalid && form.city.$touched">
<strong>*City is Required</strong>
</span>
<input class="form-control" ng-model="formdata.city" ng-required="true" name="city" value="<% formdata.city %>" id="locality" >
</div>
但是当我编写城市、州和国家本身时,一切正常。那么我如何将它与 google api 一起使用
【问题讨论】:
标签: javascript angularjs google-maps autocomplete