angular-material-extensions / google-maps-autocomplete

Autocomplete input component and directive for google-maps built with angular and material design |
https://angular-material-extensions.github.io/google-maps-autocomplete
MIT License
171 stars 61 forks source link

fix(material): import deeply from the specific components #242

Closed heavybeard closed 4 years ago

heavybeard commented 4 years ago

Fix use of this paragraph's instruction https://angular.io/guide/ivy#ivy-and-libraries with paragraph's instruction from https://update.angular.io/#8.2:9.0

Instead of importing from @angular/material, you should import deeply from the specific component. E.g. @angular/material/button

szechyjs commented 4 years ago

Without this it causes the following compile error in Angular 9.

ERROR in Failed to compile entry-point @angular-material-extensions/google-maps-autocomplete (es2015 as esm2015) due to compilation errors:
node_modules/@angular-material-extensions/google-maps-autocomplete/fesm2015/angular-material-extensions-google-maps-autocomplete.js:912:26 - error NG1010: Value at position 4 in the NgModule.imports of MatGoogleMapsAutocompleteModule is not a reference: [object Object]

912                 imports: [
                             ~
913                     CommonModule,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
918                     MatIconModule
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
919                 ],
    ~~~~~~~~~~~~~~~~~
AnthonyNahas commented 4 years ago

v4.0.0 is now released and this is already fixed! thank you