Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'agm-map' is not a known element #1563

Closed
n1t3w0lf opened this issue Dec 29, 2018 · 3 comments
Closed

'agm-map' is not a known element #1563

n1t3w0lf opened this issue Dec 29, 2018 · 3 comments

Comments

@n1t3w0lf
Copy link

Hi All

i am a student learning angular and ionic
i am using angular cli 6.2.4 and ionic 4.2.1
I would like to make use of Angular Google Maps (AGM)

In the app.module.ts i have imported after running npm install @agm/core --save
import { AgmCoreModule } from '@agm/core';

in the @NgModule imports array i have added AgmCoreModule.forRoot({apiKey: 'API KEY HERE'})

When trying to add to one of my component pages created with the ionic cli i get the following error:
'agm-map' is not a known element:

  1. If 'agm-map' is an Angular component, then verify that it is part of this module.
  2. If 'agm-map' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

the funny thing is that if i go to app.html i am able to successfully add the tag with no errors

any ideas what could be causing this issue

@hebra
Copy link

hebra commented Jan 7, 2019

@n1t3w0lf are the other pages you created in their own modules? If so, you will need to import the AgmModule there as well.

@n1t3w0lf
Copy link
Author

n1t3w0lf commented Jan 8, 2019

@hebra
Each new page i created does have an module.ts file after adding the imports here it seems to be working

Thank you very much for your feedback

@hebra
Copy link

hebra commented Jan 8, 2019

@n1t3w0lf you're welcome. Please close the issue as it is not an issue.

@n1t3w0lf n1t3w0lf closed this as completed Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants