Skip to content

Instantly share code, notes, and snippets.

@mav-erick
Last active July 29, 2018 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mav-erick/5e1b67ef695be459db4748ba6b8ed283 to your computer and use it in GitHub Desktop.
Save mav-erick/5e1b67ef695be459db4748ba6b8ed283 to your computer and use it in GitHub Desktop.
Google places autocomplete - app.component.html v2
<div style="text-align:center">
<h1>
Welcome to {{ title }}!
</h1>
<img width="300" alt="Angular Logo">
</div>
<div class="input-container">
<input
type="text"
class="google-place-input"
google-place
(onSelect)="setAddress($event)"
placeholder="Type to search..">
<!-- Displaying the contents of the address object received from our event emitter -->
<ul style="list-style-type: none;">
<li *ngFor="let key of addrKeys">
<span style="font-weight: bold">{{key}}</span>: <span>{{addr[key]}}</span>
</li>
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment