WebStorm 9.0.0 Web Help

WebStorm provides integration with the AngularJS framework.

On this page:

Preparing to use AngularJS

  1. Install AngularJS. You can do it in two ways:
  2. Make sure the AngularJS plugin is enabled. The plugin is bundled with WebStorm and activated by default. If not, enable it as described in Enabling and Disabling Plugins.

Installing AngularJS Manually

  1. Download the AngularJS framework at http://angularjs.org/.
  2. Configure AngularJS as a WebStorm JavaScript library, to let WebStorm recognize AngularJS-specific structures and provide full coding assistance:
    1. Open the Project Settings dialog box and click JavaScript Libraries.
    2. In the Libraries area, click the Add button.
    3. In the New Library dialog box that opens, specify the name of the library.
    4. Click the Add button add next to the list of library files and choose Attach Files or Attach Directory on the context menu, depending of whether you need separate files or an entire folder.
    5. Select the Angular.js or Angular.min.js, or an entire directory in the dialog box that opens. WebStorm returns to the New Library dialog box where the Name read-only field shows the name of the selected files or folder.
    6. In the Type field, specify which version you have downloaded and are going to add.
      • If you added Angular.js, choose Debug. This version is helpful in the development environment, especially for debugging.
      • If you added the minified Angular.min.js, choose Release. This version is helpful in the production environment because the file size is significantly smaller.
    Learn more at Configuring JavaScript Libraries.

Creating an AngularJS Project

WebStorm can generate a project stub for developing applications using AngularJS. WebStorm downloads AngularJS and sets up the project structure according to the AngularJS requirements.

AngularJS Support

  • AngularJS-aware code completion for ng directives (also including custom directives), controller and application names, and code insights for data bindings inside curly-brace expressions {{}}.
  • AngularJS-specific navigation:
    • Between the name of a controller name in HTML and its definition in JavaScript.
    • Between ngView or &routeProvider to the template.
    • Go To Symbol navigation for entities.
  • Quick documentation look-up by pressing Ctrl+Q or Alt+Button2 ClickCtrl+Q or Alt+Button2 ClickCtrl+Q or Alt+Button2 ClickCtrl+Q or Alt+Button2 ClickCtrl+Q or Alt+Button2 ClickCtrl+QCtrl+Q or Alt+Button2 ClickAlt+Button2 Click, Ctrl+Shift+Space or F2F1, Control J or Control Button2 ClickControl J or Control Button2 ClickAlt Button2 Click or F2, see Viewing Inline Documentation for details.

See Also

Procedures:

Web Resources: