All Projects → skynet2 → ngx-google-places-autocomplete

skynet2 / ngx-google-places-autocomplete

Licence: MIT license
Google Places autocomplete for angular web project

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to ngx-google-places-autocomplete

Ngx File Drop
Angular 11 file and folder drop library
Stars: ✭ 220 (+158.82%)
Mutual labels:  ngx
ngx-ion-simple-mask
Input mask for Angular/Ionic
Stars: ✭ 21 (-75.29%)
Mutual labels:  ngx
angular-audio-context
An Angular wrapper for the Web Audio API's AudioContext.
Stars: ✭ 20 (-76.47%)
Mutual labels:  ngx
Ngx Tour
Product Tour Built in Angular
Stars: ✭ 223 (+162.35%)
Mutual labels:  ngx
Guesstimator
🍻Uses Google, Yelp, and Foursquare APIs to retrieve and rank bars
Stars: ✭ 84 (-1.18%)
Mutual labels:  google-places
angular-inviewport
A simple lightweight library for Angular with no other dependencies that detects when an element is within the browser viewport and adds a "sn-viewport-in" or "sn-viewport-out" class to the element
Stars: ✭ 72 (-15.29%)
Mutual labels:  ngx
Tinystate
A tiny, yet powerful state management library for Angular
Stars: ✭ 207 (+143.53%)
Mutual labels:  ngx
angular-masonry
A simple lightweight library to use Masonry layout in Angular
Stars: ✭ 11 (-87.06%)
Mutual labels:  ngx
HelpOff
Providing help via offline system : Runner-Up at NMIMS Hackathon 2018
Stars: ✭ 20 (-76.47%)
Mutual labels:  google-places
flutter google places picker
Google Places Autocomplete for Flutter
Stars: ✭ 20 (-76.47%)
Mutual labels:  google-places
Angularmaterialfirebase
🔥 Full stack starter app with Angular 8, Material Design and Firebase (+ demo)
Stars: ✭ 229 (+169.41%)
Mutual labels:  ngx
PlaceAutocomplete
A Kotlin library that helps developers save weeks of effort in migrating from the default Google Places Autocomplete feature.It uses the latest Places API and is build on top of MVVM Architecture and uses various RxJava operators to optimise location requests.
Stars: ✭ 25 (-70.59%)
Mutual labels:  google-places
mvp-sample
Demonstrates how to implement MVP (Model View Presenter) pattern using Kotlin, RXJava, Retrofit, Dagger and DataBinding
Stars: ✭ 35 (-58.82%)
Mutual labels:  google-places
Angular Awesome List
Список ресурсов по Angular на русском
Stars: ✭ 224 (+163.53%)
Mutual labels:  ngx
angular-image-loader
A simple progressive, responsive, lazy image and video loading library for Angular that detects browser size and loads the appropriate image or video only when the element is in viewport. This package requires @thisissoon/angular-inviewport
Stars: ✭ 21 (-75.29%)
Mutual labels:  ngx
Ngx Contextmenu
An Angular component to show a context menu on an arbitrary component
Stars: ✭ 208 (+144.71%)
Mutual labels:  ngx
google-maps-places-geolocation-for-your-ionic-app
Ionic example app of how to add Google maps, places, geolocation and related features into an Ionic Framework app.
Stars: ✭ 13 (-84.71%)
Mutual labels:  google-places
angular-ellipsis
A simple lightweight library for Angular which removes excess text and add ellipsis symbol to end of text before text overflows container
Stars: ✭ 16 (-81.18%)
Mutual labels:  ngx
Android-Google-Places-API
An easy implementation of Google Places API in Android https://developers.google.com/places/web-service/
Stars: ✭ 53 (-37.65%)
Mutual labels:  google-places
ngx-echarts
Apache ECharts component for Angular(基于 Angular 的 Apache ECharts 组件)
Stars: ✭ 82 (-3.53%)
Mutual labels:  ngx

ngx-google-places-autocomplete

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

NPM

Installation

npm

npm install ngx-google-places-autocomplete

yarn

yarn add ngx-google-places-autocomplete

Integration

  1. Add google library in your index.html file :
    <script src="https://maps.googleapis.com/maps/api/js?key=<Your API KEY>&libraries=places&language=en"></script>
  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)
import { GooglePlaceModule } from "ngx-google-places-autocomplete";

@NgModule({
    imports: [GooglePlaceModule, BrowserModule, FormsModule, ...],
        ....
        })
  1. Add directive ngx-google-places-autocomplete to your input field (options is an optional parammeter)
<input ngx-google-places-autocomplete [options]='options' #placesRef="ngx-places" (onAddressChange)="handleAddressChange($event)"/>
  1. Additionally you can reference directive in your component
    @ViewChild("placesRef") placesRef : GooglePlaceDirective;
    
        public handleAddressChange(address: Address) {
        // Do some stuff
    }

Angular Universal

In order to use under angular universal please check that comment #15 (comment)

Options

Refer to original google maps api - https://developers.google.com/maps/documentation/javascript/places-autocomplete Options object - https://github.com/skynet2/ngx-google-places-autocomplete/blob/master/src/objects/options/options.ts Google doc for Options : https://developers.google.com/maps/documentation/javascript/reference/places-widget#AutocompleteOptions Example :

[options]="{
    types: [],
    componentRestrictions: { country: 'UA' }
    }"

GitHub

Please feel free to declare issues or contribute: https://github.com/skynet2/ngx-google-places-autocomplete

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].