Angular official documentation style guides mentioned template using the IDE to achieve a unified style, inside the IDE does not mention WebStorm, so the online search relevant information.
Install plug
Referring to WebStorm latest 2016 AngularJs 2 code hints plug-in installed .
Select the left webstorm Plugin option of setting or performance (macos), then click Browse repositories.
In the search box search Angular 2 TypeScript Live Templates, and then click Install, you will be prompted to restart webstorm, restart after installed.
If you set up a proxy on your computer, click on the lower left corner of the HTTP proxy settings, select auto-detect proxy settings, and then download it.
Use plug-ins
Angular 2 TypeScript Live Templates (Snippets) for WebStorm on github with instructions, I look at the instructions in this demo.
TypeScript Snippets
TypeScript plug-ins for the following instructions:
1 |
ng2-component-root // Angular 2 root App component |
Instruction will be prompted to select the appropriate template command generates default.
HTML Snippets
Angular plug-in also prompted the following command:
1 |
ng2-ngClass |