Search code examples
angularwebstorm

New Angular @if template syntax is not working in my webapp


I am looking for your help.

The new Angular @if template syntax is not working in my Angular web app and to be more specific it seems that it is not recognized as a possible syntax. An example:

enter image description here

Does anybody know what to do? Thank you in advance.

I already updated Angular to version 18 and created a new test app. I got the same result.


Solution

  • It looks like you are using an old version of WebStorm, which doesn't have support for control flow yet. Please update to at least v2023.3.2, or better v2024.1

    See https://blog.jetbrains.com/webstorm/2023/12/webstorm-2023-3-2/#notable_fixes