Search code examples
angulargoogle-mapsgoogle-maps-autocomplete

Google map autocomplate in Angular


I am able to use google map autocomplete in HTML but when I tried to use it in ng-template it worked behind I see in the network but I cant see the dropdown result.

    <ng-template>
            <input ngx-google-places-autocomplete [options]='options' #placesRef="ngx-places" 
            (onAddressChange)="handleAddressChange($event)"/>
    </ng-template>

thank you


Solution

  • I fixed the issue with CSS. It was working behind the ng-template. I added below code.

      ::ng-deep .pac-container {
          z-index: 100000;
      }