Webstorm does not understand Angular 2?

I downloaded this Angular 2 app (which is working without any kind of errors) and opened using Webstorm. Why some objects are in red color and some others are underlined by red lines?

 

 

 

5 comments
Comment actions Permalink

Do you have Angular2 node modules installed? Please attach your project

0
Comment actions Permalink

The dependencies in this app are directly loaded from CDN, no need to install locally.

This is a sample app written by Angular 2 doc team & available in Plunker at the following link:

http://plnkr.co/edit/ER0tf8fpGHZiuVWB7Q07?p=preview 

This is an error free, working app.

(There is a download button near to the top right corner, in case you want to download and see)

0
Comment actions Permalink

thanks, but it's incomplete - it doesn't include Angular2 modules. To enable Angular2 support, you need installing Angular2 and other dependencies in your project. See https://angular.io/docs/ts/latest/quickstart.html#!#add-config-files

>This is an error free, working app.

As far as I can see, it's loaded and compiled on-the-fly by System.js using online typescript/angular libraries specified in systemjs.config.js. Doesn't works for me, BTW, but it doesn't really matter. The problem is that WebStorm can't use online resources for types resolving. You need to have all required dependencies available locally, in your project. See https://blog.jetbrains.com/webstorm/2016/04/angular-2-workflow-in-webstorm/.

 

0
Comment actions Permalink

The systemjs.config.js tells where to find the dependencies, but unfortunately Webstorm unable to make use of online dependencies.

This seems an inability of Webstorm. Does this create a way to make a feature request?

0
Comment actions Permalink

No. Under no circumstances will WebStorm use online resources available via CDN links for type hinting - this would make its main features slow and unreliable.

Having libraries available locally is a requirement that will never be changed

0

Please sign in to leave a comment.