Integrate Google maps autocomplete with Angular & Angular material

1. Before you begin :

2. Create a new Angular project :

ng new google-maps-autocomplete

3. Install dependancies :

npm i @agm/corenpm i -D @types/googlemapsng add @angular/materialng add @angular-material-extensions/google-maps-autocompletenpm i @angular/flex-layout

4. Import modules :

4. Add this code to app.component.html :

5. let’s test the app:

6. Last word:

I'm Hamdi, a software engineer 👨‍💻, and writer 📝

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store