souzadriano / ionic2-google-places-autocomplete

Other
8 stars 5 forks source link

[Error]: 'google-place-autocomplete' is not a known element #2

Closed Pazitos10 closed 7 years ago

Pazitos10 commented 7 years ago

Hi again! when trying to use this module and run ionic either with serve or run options I get this error message:

bug_ionic

And it's caused due to a typo in README.md, so when it says:

<google-place-autocomplete (callback)="detail($event[0])" key="GOOGLE_PLACES_API_KEY"></google-place-autocomplete>

It should be:

<google-places-autocomplete (callback)="detail($event[0])" key="GOOGLE_PLACES_API_KEY"></google-places-autocomplete>

That is so because according to the source code (in the dist files):

...
GooglePlacesAutocompleteComponent.decorators = [
        { type: Component, args: [{
                    selector: 'google-places-autocomplete',
...

Notice that the selector name is 'google-places-autocomplete' instead of 'google-place-autocomplete'

So, fixing README.md should do the trick :)

Cheers! P.S.: Sorry this is too verbose.

souzadriano commented 7 years ago

Thank you again @Pazitos10 , I update README and npm repository.