Skip to content

Commit 1f88ec6

Browse files
committed
fix(docs): replaced onAddressSelected with onAutocompleteSelected - typo error #40
1 parent 9615051 commit 1f88ec6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ add `mat-google-maps-auto-complete` element to your template
167167

168168
```html
169169
<mat-google-maps-autocomplete [appearance]="appearance.OUTLINE"
170-
(onAddressSelected)="onAddressSelected($event)"
170+
(onAutocompleteSelected)="onAutocompleteSelected($event)"
171171
(onLocationSelected)="onLocationSelected($event)">
172172
</mat-google-maps-autocomplete>
173173
```
@@ -177,7 +177,7 @@ A customized `mat-google-maps-autocomplete`
177177
```html
178178
<mat-google-maps-autocomplete country="us"
179179
type="address"
180-
(onAddressSelected)="onAddressSelected($event)"
180+
(onAutocompleteSelected)="onAutocompleteSelected($event)"
181181
(onLocationSelected)="onLocationSelected($event)">
182182
</mat-google-maps-autocomplete>
183183
```
@@ -197,7 +197,7 @@ combine the result of the `mat-google-maps-autocomplete` with a google map insta
197197
class="autocomplete-container"
198198
[ngStyle.xs]="{'min-width.%': 100}"
199199
[ngStyle.sm]="{'width.%': 70}">
200-
<mat-google-maps-autocomplete (onAddressSelected)="onAddressSelected($event)"
200+
<mat-google-maps-autocomplete (onAutocompleteSelected)="onAutocompleteSelected($event)"
201201
(onLocationSelected)="onLocationSelected($event)">
202202
</mat-google-maps-autocomplete>
203203
</div>
@@ -253,8 +253,8 @@ export class HomeComponent implements OnInit {
253253
}
254254
}
255255

256-
onAddressSelected(result: PlaceResult) {
257-
console.log('onAddressSelected: ', result);
256+
onAutocompleteSelected(result: PlaceResult) {
257+
console.log('onAutocompleteSelected: ', result);
258258
}
259259

260260
onLocationSelected(location: Location) {

src/module/component/mat-google-maps-autocomplete.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export class MatGoogleMapsAutocompleteComponent implements OnInit {
117117
}
118118
this.address = place.formatted_address;
119119
this.onAutocompleteSelected.emit(place);
120+
// console.log('onAutocompleteSelected -> ', place);
120121
this.onLocationSelected.emit(
121122
{
122123
latitude: place.geometry.location.lat(),

0 commit comments

Comments
 (0)