google-maps-autocomplete
google-maps-autocomplete copied to clipboard
Dynamic options
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [x] feature request
OS and Version?
Windows 10
Versions
Angular CLI: 8.2.1 Node: 10.15.1 OS: win32 x64 Angular: 8.2.2 ... animations, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router
Package Version
@angular-devkit/architect 0.802.1 @angular-devkit/build-angular 0.802.1 @angular-devkit/build-optimizer 0.802.1 @angular-devkit/build-webpack 0.802.1 @angular-devkit/core 8.2.1 @angular-devkit/schematics 8.2.1 @angular/cdk 8.1.3 @angular/cli 8.2.1 @angular/material 8.1.3 @ngtools/webpack 8.2.1 @schematics/angular 8.2.1 @schematics/update 0.802.1 rxjs 6.4.0 typescript 3.5.3 webpack 4.38.0
Issue
Hello,
I would like to use the autocomplete as a directive with dynamic options and change some params based on user input in runtime.
I found that the directive accepts [country] only once - when I change it, directive doesn't know about it.
Is it known issue?
thanks.
<input type="text" matInput placeholder="Primary Address" formControlName="primaryAddressFormControl" matGoogleMapsAutocomplete [country]="selectedCountry" (onAutocompleteSelected)="handleAddressChange($event)">
handleCountryChange($event) { this.selectedCountry = $event; }
@Andrii-A Thanks for contributing!
I will try to fix that!
I am running into this same issue. Trying to pass a value into the autocomplete input so that it can resolve it as a defaulted option onInit. Was this ever resolved or is there a good work-around?