Skip to content

Commit

Permalink
fix(docs): replaced onAddressSelected with onAutocompleteSelected
Browse files Browse the repository at this point in the history
… - typo error #40
  • Loading branch information
AnthonyNahas committed Dec 11, 2018
1 parent 9615051 commit 1f88ec6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ add `mat-google-maps-auto-complete` element to your template

```html
<mat-google-maps-autocomplete [appearance]="appearance.OUTLINE"
(onAddressSelected)="onAddressSelected($event)"
(onAutocompleteSelected)="onAutocompleteSelected($event)"
(onLocationSelected)="onLocationSelected($event)">
</mat-google-maps-autocomplete>
```
Expand All @@ -177,7 +177,7 @@ A customized `mat-google-maps-autocomplete`
```html
<mat-google-maps-autocomplete country="us"
type="address"
(onAddressSelected)="onAddressSelected($event)"
(onAutocompleteSelected)="onAutocompleteSelected($event)"
(onLocationSelected)="onLocationSelected($event)">
</mat-google-maps-autocomplete>
```
Expand All @@ -197,7 +197,7 @@ combine the result of the `mat-google-maps-autocomplete` with a google map insta
class="autocomplete-container"
[ngStyle.xs]="{'min-width.%': 100}"
[ngStyle.sm]="{'width.%': 70}">
<mat-google-maps-autocomplete (onAddressSelected)="onAddressSelected($event)"
<mat-google-maps-autocomplete (onAutocompleteSelected)="onAutocompleteSelected($event)"
(onLocationSelected)="onLocationSelected($event)">
</mat-google-maps-autocomplete>
</div>
Expand Down Expand Up @@ -253,8 +253,8 @@ export class HomeComponent implements OnInit {
}
}

onAddressSelected(result: PlaceResult) {
console.log('onAddressSelected: ', result);
onAutocompleteSelected(result: PlaceResult) {
console.log('onAutocompleteSelected: ', result);
}

onLocationSelected(location: Location) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export class MatGoogleMapsAutocompleteComponent implements OnInit {
}
this.address = place.formatted_address;
this.onAutocompleteSelected.emit(place);
// console.log('onAutocompleteSelected -> ', place);
this.onLocationSelected.emit(
{
latitude: place.geometry.location.lat(),
Expand Down

0 comments on commit 1f88ec6

Please sign in to comment.