npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ng-gplace-autocomplete

v0.0.15

Published

An angular componet for google maps autocomplete!

Readme

Build Status

This project was generated with Angular CLI version 8.1.2.

ng-gplace-autocomplete

This is a demo project for ng-gplace-autocomplete angular component.

ng autocomplete demo

Integration

The first thing we have to do, is to install the ng-gplace-autocomlete in our project via npm.

npm i ng-gplace-autocomplete

Then, once the component has been successfully downloaded, we need to update our project with the types of google maps. This is done through the command bellow via npm again.

npm i @types/googlemaps

After that, we need to update our projects index.html with the Google Maps JavaScript API. To link this page with the api, we must add the script bellow in our index.html inside the head tag.

<script src="https://maps.googleapis.com/maps/api/js?key=<Your API KEY>&libraries=places&language=en"></script>

Replace with google places . Ref - Google Maps API

At this point, the component installation is complete. On the nex section, we will go through the component instalation.

Usage

  1. Add the NgAutocompleteModule into your application module ( e.g. app.module.ts )
import { NgAutocompleteModule } from 'ng-gplace-autocomplete';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgAutocompleteModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
  1. Add the ng-autocomplete component to your app.component.html like bellow
 <ng-autocomplete [addressType]="type" [country]="countryRestrictions" (onAddressChange)="onAddressChange($event)"></ng-autocomplete>
  1. Create two consts in your app.component.ts for addresType and country parameters
  type:'address';  //This value could be address | geocode | establishment
  countryRestrictions=['gr']; //If not set, default is ['us']
  1. Attach a function to the (onAddressChange) event like above and add this function to you app.component.ts file.
onAddressChange(event:any){
    //Do some staff
    console.log(event);
  }

After that, on every address selection, we should get a json object about the selected address like the following:

Screenshot from 2019-08-01 02-23-40

Styling

You can easily style the ng-autocomplete component by adding your styles as an object to the style property like below:

 <ng-autocomplete [addressType]="type" [country]="countryRestrictions" [style]="{'width':'400px','font-size':'1.1em'}" (onAddressChange)="onAddressChange($event)"></ng-autocomplete>

GitHub

Please feel free to declare issues or contribute: ng-autocomplete repo

Keywords

autocomplete typescript google places angular 8 angular 7 angular 6 angular 5 angular 4 angular 2