question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Template parse errors: 'agm-map' is not a known element:

See original GitHub issue

Please help me,

my dependencies:
@agm/core”: “^1.0.0-beta.0”

my app.module: import { AgmCoreModule } from '@agm/core';

AgmCoreModule.forRoot({ apiKey: ‘(myapikey)’ })

my template:

<ion-content padding>
	<agm-map></agm-map>
</ion-content>

which is the error?

thanks, you are the best!!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10

github_iconTop GitHub Comments

19reactions
Golem765commented, Dec 22, 2017

@jespoz Encountered same error, solution was to add AgmCoreModule to imports at the module that uses the map, so having AppModule and AccountModule I have following imports:

@NgModule({
    imports: [
        ***,
        AgmCoreModule.forRoot({
            apiKey: 'AIzaSyAsMcr_0zqJ0QG18Z4cx-ETuOps02jhD3g'
        })
    ],
    declarations: [***],
    bootstrap: [*** ]
})
export class AppModule {
}

@NgModule({
    imports: [
       ***,
        AgmCoreModule
    ],
    declarations: [
      ***
    ],
    providers: [
        ***
    ]
})
export class AccountModule {
}

Please note that *** stands for other non-relative to the problem imports, providers etc It is really a little ambiguous that we have to use AgmCoreModule at the nested modules

7reactions
AJRdevcommented, May 21, 2017

Oh ok, didn’t see it at first before your edited it.

Now I see the problem, you should get a look at the Plunker on the README of the project, you will understand straight away.

Basically you have to add this import :

import { Component} from '@angular/core';

Then add a component :

@Component({
  selector: 'my-map',
  styles: [`
    .sebm-google-map-container {
       height: 300px;
     }
  `],
  template: `
    <sebm-google-map>
    </sebm-google-map>
`})

And finally replace your template by :

<ion-content padding>
	<agm-map></agm-map>
</ion-content>

With that you should have a basic google map displayed. Let me know how it goes !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Template parse errors: 'agm-map' is not a known element ...
Basically I want to use the map in module other than appModule. But I am getting error as 'ngui-map' is not a known...
Read more >
agm-map is not a known element angular 4 - Stack Overflow
I'm trying to use Angular Google Maps (AGM) in my Angular project, but this error was appeared agm-map is not a known element....
Read more >
Template parse errors: : 'xxxComponent' is not a known element
Solved Angular Uncaught Error : Template parse errors : : 'xxxComponent' is not a known element : 3.4K views · 1 year ago...
Read more >
Angular Error NG8001: is not a known element ... - YouTube
... Error NG8001: 'mat-progress-spinner' is not a known element :Angular Error is an Angular component, then verify t...
Read more >
SebastianM/angular2-google-maps - Gitter
core.es5.js:1084 ERROR Error: Uncaught (in promise): Error: Template parse errors: Can't bind to 'latitude' since it isn't a known property of 'agm-map'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found