Hello This is a sample Project in Angular for using Google Places Autocomplete with the native Angular Google Maps and customising the map dynamically.
Clone the Repo and run npm install
. After that insert you Google Maps API Key in environment (and environment.prod if you like).
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
The App has been built using the Following Libraries:
- AGM-Core
- Angular Material - For Modal, Input and the Buttons
- Materialize Css - For a card View and a base layout and Typography
- @types/googlemaps: For Google namespace and classes
shared
: This Folder Contains all modules, directives, interfaces, and such that would be used throughout the App.constants
: All App Constantsdirectives
: Separate Modules that import and export directives (Google Places AutoComplete)interfaces
: Models for our Code.Modals
: All the Common Modals used. Using Angular Material.- Common Error Modal: This is called through the data Service. Uses inner HTML to enable passing of parseable html instead of a string error message.
providers
: The Data Service. We use dynamic types for get and post, and use the data service for adding postparams, headers and handling common errors.Styles
:- Materialize CSS: We use the materialize Grid, typography and helpers, and comment out the rest of the unrequired components.
- Angular Material: We Define a custom theme for our application. We have chosen a cool blue gray theme for our application.
- theme: Here we define our own variables and helpers for use throughout our application.