Readdy Write

Fehler: Uncaught Error: Template parse errors: Only void and foreign elements can be self closed EditIcon

02.04.2021 (👁7060)

 

 

 

Fehlermeldung im Angular Chrome Browser

Uncaught Error: Template parse errors:

Only void and foreign elements can be self closed "EditIcon" ("<a href="//{{ id }}">

  <Fab color="secondary" aria-label="edit" style={{ float: 'right' }}>

    [ERROR ->]<EditIcon />

  </Fab>

</a>

"): ng:///AppModule/ReadArticleComponent.html@7:4

Unexpected closing tag "Fab". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags ("

  <Fab color="secondary" aria-label="edit" style={{ float: 'right' }}>

    <EditIcon />

  [ERROR ->]</Fab>

</a>

Code in Angular.component.html

<a href="//{{ id }}">

  <Fab color="secondary" aria-label="edit" style={{ float: 'right' }}>

    <EditIcon />

  </Fab>

</a>

Lösung:

@Angular/material muss installiert werden mit ng add @angular/material --save


0,00 €