WebStorm reports an error on 'mat-sort-header requires value'

Viewed 31

I'm using Angular Material mat-soft-header attribute which works fine, but WebStorm reports an error that 'mat-sort-header requires value'.

By the way, I faced with this issue in different projects, so as I understand this is a very common problem in many projects.

Here is an example code

<table mat-table [dataSource]="dataSource" matSort>
  ...
  <ng-container matColumnDef="name">
    <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>
    <td mat-cell *matCellDef="let element"> {{element.name}} </td>
  </ng-container>
  
</table>

Also attaching the error message by WebStorm:

enter image description here

Can anybody help to understand and resolve this issue?

1 Answers

Nothing is wrong with your code, it's a bug in the IDE. Please vote for WEB-57358 to be notified on any progress with it

Related