Search code examples
angularintellij-ideaangular-materialangular-directive

IntelliJ IDEA shows error for matHeaderRowDef


IntelliJ Idea 2020.1 shows this error for matHeaderRowDef in a template:

Property matHeaderRowDef is not provided by any applicable directive on an embedded template

enter image description here

GitHub example to reproduce the issue

I don't understand why this error is shown:

  • The DemoMaterialModule in material.module.ts exports the MatTableModule where MatHederRowDef is defined.
  • Other structural directives from MatTableModule show now error: e.g. MatHederCellDef works fine
  • note: the application works fine when you start it - so maybe it's just an issue in the IDE

What am I missing?


Solution

  • This was a bug in IntelliJ and is fixed in Version 2020.1.2