New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@yuvarajv/ngx-google-places-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yuvarajv/ngx-google-places-autocomplete - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

8

lib/ngx-google-places-autocomplete.module.d.ts
import * as i0 from "@angular/core";
import * as i1 from "./ngx-google-places-autocomplete.directive";
export declare class NgxGooglePlacesAutocompleteModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NgxGooglePlacesAutocompleteModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxGooglePlacesAutocompleteModule, [typeof i1.NgxGooglePlacesAutocompleteDirective], never, [typeof i1.NgxGooglePlacesAutocompleteDirective]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NgxGooglePlacesAutocompleteModule>;
export declare class GooglePlaceModule {
static ɵfac: i0.ɵɵFactoryDeclaration<GooglePlaceModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<GooglePlaceModule, [typeof i1.NgxGooglePlacesAutocompleteDirective], never, [typeof i1.NgxGooglePlacesAutocompleteDirective]>;
static ɵinj: i0.ɵɵInjectorDeclaration<GooglePlaceModule>;
}
{
"name": "@yuvarajv/ngx-google-places-autocomplete",
"version": "0.0.1",
"version": "1.0.0",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/common": "^13.3.0",

@@ -0,1 +1,69 @@

# ngx-google-places-autocomplete
This module is a wrapper for Google Places Autocomplete js library.
[![NPM](https://nodei.co/npm/@yuvarajv/ngx-google-places-autocomplete.png)](https://nodei.co/npm/@yuvarajv/ngx-google-places-autocomplete/)
## Note
This project code inherited from https://github.com/skynet2/ngx-google-places-autocomplete to make it work better with angular 13.x
# Installation
#### npm
```
npm i @yuvarajv/ngx-google-places-autocomplete
```
#### yarn
```
yarn add @yuvarajv/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>
```
2. Replace <You API KEY> 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)
```ts
import { GooglePlaceModule } from "@yuvarajv/ngx-google-places-autocomplete";
@NgModule({
imports: [GooglePlaceModule, BrowserModule, FormsModule, ...],
....
})
```
2. 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)"/>
```
3. Additionally you can reference directive in your component
```ts
@ViewChild("placesRef") placesRef : GooglePlaceDirective;
public handleAddressChange(address: Address) {
// Do some stuff
}
```
## 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 :
```html
[options]="{
types: [],
componentRestrictions: { country: 'UA' }
}"
```
# GitHub
Please feel free to declare issues or contribute: https://github.com/shivarajnaidu/ngx-google-places-autocomplete
## Development
# NgxGooglePlacesAutocomplete

@@ -2,0 +70,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc