Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 976 Bytes

File metadata and controls

42 lines (33 loc) · 976 Bytes

Ionic 2.2+ Google Places Autocomplete

Ionic 2.2+ Google Places Autocomplete.

Install

npm install --save ionic2-google-places-autocomplete

Usage

import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';

import { GooglePlacesAutocompleteComponentModule } from 'ionic2-google-places-autocomplete';

@NgModule({
  declarations: [
    MyApp,
    HomePage
  ],
  imports: [
    IonicModule.forRoot(MyApp),
    GooglePlacesAutocompleteComponentModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage
  ],
  providers: []
})
export class AppModule {}
<google-places-autocomplete (callback)="detail($event[0])" key="GOOGLE_PLACES_API_KEY"></google-places-autocomplete>

All list of parameters and result can be viewed in: https://developers.google.com/places/web-service/autocomplete