【发布时间】:2016-07-01 12:58:16
【问题描述】:
我在 Angular 中遇到 google 自动完成问题。
结构是index.html
我有一页显示在 ng-view - road.html 中。
Road.html
<input id="locationFrom" type="text" class="form-control"/>
道路控制器:
app.controller("roadMapController", function () {
var input = document.getElementById("locationFrom");
var autocomplete = new google.maps.places.Autocomplete(input);
}
我在控制台中没有错误,输入得到额外的占位符“写入位置...”,但是当我输入时,没有应有的提示。
我做错了什么?
【问题讨论】:
标签: javascript angularjs google-maps-api-2