1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Angular in IntelliJ IDEA Ultimate: red underlines on <mat-*> and <app-*> tags, but code is...

Discussão em 'Angular' iniciado por Taron, Setembro 13, 2025.

  1. Taron

    Taron Guest

    I’m working on an Angular project in IntelliJ IDEA Ultimate.

    In my Angular templates (.html files), IntelliJ marks Angular Material and custom component tags with red underlines, for example:

    <mat-button-toggle>
    <mat-icon>save</mat-icon>
    </mat-button-toggle>



    Even though the code runs fine, IntelliJ highlights these tags as if they were errors (“Unknown HTML tag”).

    If I disable the Angular/AngularJS plugin, the red underlines disappear.

    ❌ But then I lose the linking between HTML and TypeScript (e.g. (click)="finishDrawing()" no longer resolves to the TS function).

    If I enable the Angular plugin, the linking works fine.

    ❌ But IntelliJ still shows Angular Material and custom tags as invalid.

    I already checked:

    Angular plugin is installed and active.

    Angular Language Service is enabled (Settings → Languages & Frameworks → TypeScript → Angular).

    Project compiles and runs correctly.

    Question

    How can I configure IntelliJ IDEA so that:

    It keeps Angular ↔ TS linking (Angular plugin stays enabled),

    but it stops showing red underlines for Angular Material tags (mat-) and custom Angular components (app-)?

    Is there a way to either whitelist these tags or correctly configure inspections?

    [​IMG]

    Continue reading...

Compartilhe esta Página