I have project angular-cli
~root~/src/typings.json
{
\"globalDevDependencies\": {
\"angular-protractor\": \"registry:dt/angula
For Angular 9.****
I tried installing @types/googlemaps, It did not work for me.
I downgrade it to "@types/googlemaps": "3.39.12" then worked perfectly fine.
this is my code
In tsconfig.app.json (add googlemaps to types array)
"types": [
"googlemaps"
]
In app module.ts
import { AgmCoreModule } from '@agm/core';
.
.
.
.
imports: [
BrowserModule,
AppRoutingModule,
AgmCoreModule.forRoot({
apiKey: '...KEY...',
libraries: ['places']
})
],
To downgrade @types/googlemaps, go to pakage.json file in the project root folder and change @types/googlemaps version to "3.39.12". it's better if you delete files form
node_module -> @types -> googlemaps
Then in the terminal enter
npm install