Search code examples
angularintellij-ideawebstorm

IntelliJ "Unused variable" Angular


As I am learning @ngrx I realized the following:

When I define an Observable as a component attribute and suffix it with $, and only use it in the template .html-file, IntelliJ does not register the attribute as used but displays it grey. This only happens when the variable ends with $.. Any idea how that is possible?

Inside the component In the component's template


Solution

  • It's a known issue, tracked as WEB-34352. Renaming your variable to a name without $ suffix should help