Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module '@agm/core'

I am trying to use Google maps in my angular 4 app.
I am using Angular 4 and Nodejs 8.

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ApplicationRef } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';

import { AgmCoreModule } from '@agm/core';

@NgModule({
  imports: [
    BrowserModule,
    CommonModule,
    FormsModule,
    AgmCoreModule.forRoot({
      apiKey: 'GOOGLEAPIKEY'
    })
  ],
  providers: [],
  declarations: [ AppComponent ],
  bootstrap: [ AppComponent ]
})
export class AppModule {}

Please help me ??

like image 705
Vishal Biradar Avatar asked Jul 13 '17 13:07

Vishal Biradar


People also ask

What is agm core in angular?

AGM - Angular Google MapsAngular components for Google Maps. ( Previously known as angular2-google-maps)


1 Answers

npm install @agm/core --save

This command solved my problem.Thanks a lot.

like image 162
Vishal Biradar Avatar answered Sep 19 '22 16:09

Vishal Biradar