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

@angular-magic/ngx-gp-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular-magic/ngx-gp-autocomplete

This module is a wrapper for Google Places Autocomplete JS library

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.8K
decreased by-10.37%
Maintainers
1
Weekly downloads
 
Created
Source

ngx-gp-autocomplete

Ngx-Markdown Logo

Demo: https://ngx-gp-autocomplete.angularmagic.com

This module is a wrapper for Google Places Autocomplete js library. Initial code base was copied from this project ngx-google-places-autocomplete, this module applies some fixes and improvements. Like @types/google.maps and @googlemaps/js-api-loader

NPM

Installation

npm

npm install @angular-magic/ngx-gp-autocomplete
npm install @googlemaps/js-api-loader
npm install --save @types/google.maps

Integration

  • Import NgxGpAutocompleteModule into your application module
import { NgxGpAutocompleteModule } from "@angular-magic/ngx-gp-autocomplete";

@NgModule({
  imports: [
    NgxGpAutocompleteModule,
    BrowserModule,
    FormsModule,
    //...
  ],
  providers: [
    {
      provide: Loader,
      useValue: new Loader({
        apiKey: 'YOUR_API_KEY',
        libraries: ['places']
      })
    },
    //...
  ],
  //...
})
<input #placesRef="ngx-places" ngx-gp-autocomplete [options]='options' (onAddressChange)="handleAddressChange($event)"/>
  • Additionally you can reference directive in your component
export class Component {
  @ViewChild('ngxPlaces') placesRef: NgxGpAutocompleteDirective;

  public handleAddressChange(place: google.maps.places.PlaceResult) {
    // Do some stuff
  }
}

GitHub

Please feel free to declare issues or contribute: https://github.com/angular-magic/ngx-gp-autocomplete

Keywords

FAQs

Package last updated on 26 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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