Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

Angular Uncaught Error: Template parse errors: : 'ArticleComponent' is not a known element:

23.03.2021 (πŸ‘6949)

Angular Uncaught Error: Template parse errors: : 'ArticleComponent' is not a known element:

 

Fehlermeldung beim Start der Angular Anwendung:

Die Anwendung bleibt bei Loading.. stehen und unter Developer->Untersuchen->Console steht der Lade Fehler         

Fehlermeldung:

compiler.js:2175 Uncaught Error: Template parse errors:

'ArticleComponent' is not a known element:

1. If 'ArticleComponent' is an Angular component, then verify that it is part of this module.

 

 

Ursache in Angular

In der Ausgabe.component.html wurde nicht der Selector sondern der Component name eingetragen

<h1>Hello, world!</h1>

 

<app-article></app-article>

 

 

 

LΓΆsung: man muss den Selector in der HTML Ausgabe eintragen

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

 

@Component({

  selector: 'app-article',

  templateUrl: './article.component.html',

  styleUrls: ['./article.component.css']

})

export class ArticleComponent implements OnInit {

 

  constructor() { }

 

  ngOnInit() {

  }

 

}

Hier aus der Angular Komponente der Selector

Error message in console

compiler.js:2175 Uncaught Error: Template parse errors:

'ArticleComponent' is not a known element:

1. If 'ArticleComponent' is an Angular component, then verify that it is part of this module.

2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("<h1>Hello, world!</h1>

[ERROR ->]<ArticleComponent></ArticleComponent>

"): ng:///AppModule/HomeComponent.html@1:0

    at syntaxError (compiler.js:2175)

    at TemplateParser.parse (compiler.js:11388)

    at JitCompiler._parseTemplate (compiler.js:25961)

    at JitCompiler._compileTemplate (compiler.js:25949)

    at compiler.js:25893

    at Set.forEach (<anonymous>)

    at JitCompiler._compileComponents (compiler.js:25893)

    at compiler.js:25806

    at Object.then (compiler.js:2166)

    at JitCompiler._compileModuleAndComponents (compiler.js:25805)