angular-google-places-autocomplete

Pure AngularJS directive for Google Places Autocomplete

Angular Core Dependency: ^1.2.x

Added by: Sam Deering

GitHub

Repository

kuhnza/angular-google-places-autocomplete

Stats

Stars: 150

Watchers: 150

Forks: 89

Author

Dave Kuhn
Dave Kuhn

Module Description

angular-google-places-autocomplete

Angular directive for the Google Places Autocomplete component.

Installation

Install via bower: bower install angular-google-places-autocomplete

Or if you're old skool, copy src/autocomplete.js into your project.

Then add the script to your page (be sure to include the Google Places API as well):

<script src="https://maps.googleapis.com/maps/api/js?libraries=places"></script>
<script src="/bower_components/angular-google-places-autocomplete/src/autocomplete.js"></script>

You'll probably also want the styles:

<link rel="stylesheet" href="/bower_components/angular-google-places-autocomplete/src/autocomplete.css">

Usage

First add the dependency to your app:

angular.module('myApp', ['google.places']);

Then you can use the directive on text inputs like so:

<input type="text" g-places-autocomplete ng-model="myScopeVar" />

The directive also supports the following optional attributes:

Examples

Issues or feature requests

Create a ticket here

Contributing

Issue a pull request including any relevant testing and updated any documentation if required.

Module stats last updated: 2017-06-10 16:00:03

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!