Angular ngx-google-places-autocomplete Example to Build Google Places & Maps Autocomplete Form Field

 

ngx-google-places-autocomplete

 

This module is a wrapper for Google Places Autocomplete js library.

NPM

 

Installation

 

npm i ngx-google-places-autocomplete

 

 

Integration

 

  1. Add google library in your index.html file :

 

 

  1. Replace with google places api key. Ref – https://developers.google.com/places/web-service/get-api-key

 

Usage

 

  1. Add a module into your application (as a rule app.module.ts)

 

 

 

 

  1. Add directive ngx-google-places-autocomplete to your input field (options is an optional parammeter)

 

 

 

 

  1. Additionally you can reference directive in your component

 

 

 

 

FULL SOURCE CODE

 

 

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *