我正在使用 ng-map 指令并将自动完成 API 放在我的 angularjs 应用程序中。哪些工作正常。但问题是我需要在引导模式中和当我在引导模式中使用相同的代码时,ng-map 和放置自动完成都不起作用。如果我遗漏了什么,建议我。仅当我使用 Angular 的 ng-map 指令时才会出现问题。使用 javascript 一切正常,但我不想编写大量代码。我只想使用 ng-map。这是我的标记
<ng-map zoom="8">
<marker visible="true" centered="true" position="current-location" title="You are Here" draggable="true"></marker>
<marker visible="true" centered="true" position="{{vm.place.formatted_address}}" title="You are looking for this" draggable="true"></marker>
<marker ng-repeat="c in vm.cities" position="{{c.pos}}" title="{{c.name}}" id="{{c.id}}" on-click="vm.showCity(event, c)"></marker>
<directions
draggable="false"
travel-mode="DRIVING"
panel="p3"
origin="jaipur"
destination="Delhi">
</directions>
</ng-map>
看我的 plunkr
对于整个代码