my project was generated with [Angular CLI] version 1.2.6.
I can compile the project and it works fine, but I always get error in vs code telling me cannot find mo
If you did what I (foolishly) did... Which was drag and drop a component folder into my project then you'll probably be able to solve it by doing what I did to fix it.
Explanation: Basically, by some means Angualar CLI must tell InteliJ what @angular means. If you just plop the file in your project without using the Angular CLI i.e. ng g componentName --module=app.module then Angular CLI doesn't know to update this reference so IntelliJ has no idea what it is.
Approach: Trigger the Angular CLI to update references of @angular. I currently know only one way to do this...
Implementation: Add a new component at the same level as the component your having issues with. ng g tempComponent --module=app.module
This should force the Angular CLI to run and update these references in the project.
Now just delete the tempComponent you just created and don't forget to remove any reference to it in app.module.
Hope this helps someone else out.