RubyMine doesn't recognize Angular components because specs take priority?

Answered

I am struggling to get RubyMine to recognise Angular and my Angular components. I have two examples of this although they are both related I suspect:

  1. When opening an Angular template, Angular specific attributes such as *ngIf have an error that reads "No directive is matched on attribute ngIf". I am presented with the option to "Import Angular Module..." which will import the module into my spec file. I'm not sure why that is the case.
  2. Other components have associated errors that read "Component or directive matching [component-name] element is out of the current Angular module's scope". Again, I am presented with an option to resolve this and it imports the associated module into my .spec file.

A curiosity I have noted is that IntelliJ Ultimate doesn't appear to have these problems and recognises everything fine with more or less the same setup and plugins that I have enabled for RubyMine. I've tried ensuring that libraries are configured under Languages & Frameworks but that doesn't seem to be the root cause of my issue.

Can anyone shed some insight as to why I receive these kinds of errors when they relate to spec files? It feels like somehow the state of the spec files are taking priority over everything else. The spec files pass all their tests fine by the way.

1 comment
Comment actions Permalink

Haven't faced such issues. Moreover, Angular support in IDEA is identical to the one in RubyMine, so they should work equally...

What does your project setup look like? Could you share a minimal sample the issue can be repeated with?

0

Please sign in to leave a comment.