@types/googlemaps/index.d.ts' is not a module

后端 未结 10 846
梦谈多话
梦谈多话 2020-12-04 14:25

I want to use the Google Maps API with my Angular project, so I used these two commands to install npm packages:

npm install @agm/core --save-dev
npm install         


        
10条回答
  •  心在旅途
    2020-12-04 14:53

    In my Angular 7+ project

    $ npm install @types/googlemaps --save-dev
    In tsconfig.app.json

    "types": [
          "googlemaps"
    ]
    

    Thank you the link below https://www.freakyjolly.com/angular-7-6-add-google-maps-in-angular-2-plus-applications-using-angular-google-maps-module-agm-core-easily/#more-2316

提交回复
热议问题