google-maps-autocomplete icon indicating copy to clipboard operation
google-maps-autocomplete copied to clipboard

Can't bind to 'country' since it isn't a known property of 'input'

Open echotech11 opened this issue 6 years ago • 5 comments

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Windows 10

Versions

Angular CLI: 8.2.0 Node: 10.14.1 OS: win32 x64 Angular: 8.2.0

Repro steps

Followed all steps to setup the module

The log given by the failure

Error: Template parse errors: Can't bind to 'country' since it isn't a known property of 'input'. (" <input matInput matGoogleMapsAutocomplete [ERROR ->][country]="us" (onAutocompleteSelected)="onAutocompleteSelected($event)" (o"):

Desired functionality

Auto complete works

Mention any other details that might be useful

The component version works. The directive gives me this error above. If I remove [country]="us" the console shows no errors, but autocomplete doesn't work.

echotech11 avatar Aug 20 '19 14:08 echotech11

I will check that

AnthonyNahas avatar Aug 20 '19 18:08 AnthonyNahas

Other properties such as "types" do not work either.

<input matInput matGoogleMapsAutocomplete [country]="us" [types]="(regions)" (onAutocompleteSelected)="onAutocompleteSelected($event)" (onLocationSelected)="onLocationSelected($event)" required />

dillilabs avatar Aug 23 '19 05:08 dillilabs

Never mind. It works.

<input country="us" [types]="['(regions)']" />

dillilabs avatar Aug 27 '19 01:08 dillilabs

@AnthonyNahas please fix this country typing error, I want to dynamic bind like this

[country]="userCountryCode"

and it is throwing an error. Major pain

jpike88 avatar Feb 01 '20 10:02 jpike88

[country]="userCountryCode"

is this issue fixed please let me know I m facing similar issue

Abhayudgire avatar Mar 05 '21 10:03 Abhayudgire