Wednesday, September 2, 2015
Update: I have updated this post with new information at the bottom about WebStorm 11 EAP
Well, I finally found the time to start looking into Angular 2, so naturally I went to the website to do the quick start demo. I got it working but I did have a some hangups getting my IDEs (yes that plural) to work with Angular 2. This is understandable considering at this writing Angular 2 is in "Alpha".
Get the Correct Version
First off, by default, Webstorm runs TypeScript 1.4, so you are going to have to get the latest version of the typescript via NPM.
$ npm install -g tsc
The current version as of this writeing is 1.5.3.
Once it is install you will neet to tell Webstorm to use this version.
Run the Correct Command Parameters
Once you have the correct version, Webstorm will still complain about the attributes. So you will need to tell it the following:
- What module system you are using. In this case I am using "system".
- Next to prarameters take care of the decorators of the class statment.
After that, following the directions on the quickstart example, everything worked fine.
With Webstorm 11 EAP you can now use the tsconfig.json file to tell Webstorm what TypeScript settings to use.
I just installed version 11 EAP:
Notice, Webstorm now uses TypeScript 1.5.3.
Also, you can now tell WebStorm to use your tsconfig.json file that is in the root of your project.