Last active
March 14, 2016 19:17
-
-
Save alxhub/3b68552181f95b8f4675 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component, AfterViewInit, ElementRef, ViewChild} from 'angular2/core'; | |
@Component ({ | |
selector: 'my-google-place-search', | |
template: `<input #pacinput id= "pac-input" class="controls" type="text" placeholder="Address">` | |
}) | |
export class GooglePlaceSearchComponent implements AfterViewInit { | |
@ViewChild('pacinput') ref: ElementRef; | |
ngAfterViewInit() { | |
var autocomplete = new google.maps.places.Autocomplete(this.ref.nativeElement, options) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment