JetBrains Rider 2020.1 Help

Using AngularJS

AngularJS also known as Angular 1 is a framework for developing single page web applications. JetBrains Rider suggests AngularJS-aware completion options for predefined and custom ng directives and for controller and application names, as well as code insights for data bindings inside curly-brace expressions {{}}. You can use built-in AngularJS live templates and navigate between the name of a controller in HTML and its definition in JavaScript or between ngView or &routeProvider and the template. For AngularJS entities, use the Go To Symbol navigation.

Before you start

  1. Download and install Node.js.

  2. Make sure the Angular and AngularJS bundled plugin is enabled on the Plugins page, see Managing plugins for details.

To open an application that is organized in the directory structure and does not have a solution file, press Ctrl+O or choose File | Open | Open File or Folder... from the main menu, and then specify the root folder of the application.

Creating a new AngularJS application

You can install AngularJS in a solution either manually, by downloading the AngularJS framework, or using the Bower package manager.

To install and configure AngularJS in an empty project manually

  1. Download the AngularJS framework at

  2. Configure AngularJS as a JetBrains Rider JavaScript library, to let JetBrains Rider recognize AngularJS-specific structures and provide full coding assistance:

    1. In the Options dialog Ctrl+Alt+S, go to Languages and Frameworks | JavaScript | Libraries. The Settings: JavaScript Libraries page opens.

    2. In the Libraries area, click the Add button.

    3. In the New Library dialog that opens, specify the name of the library.

    4. Click the Add button next to the list of library files and select Attach Files or Attach Directory from 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 that opens. JetBrains Rider returns to the New Library dialog 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, select Debug. This version is helpful in the development environment, especially for debugging.

      • If you added the minified Angular.min.js, select Release. This version is helpful in the production environment because the file size is significantly smaller.

    Learn more from Configure JavaScript libraries.

To install AngularJS in an empty project through Bower

  1. Install Bower as described in Using Bower Package Manager.

  2. In the embedded Terminal (Ctrl+Alt+1) , type bower install angular to install the package as a project dependency.

Starting with an existing AngularJS application

If you already have Angular sources in your project (for example, in the bower_components folder), just open your project and start working. If these sources are excluded from project, then you only need to configure AngularJS as a JavaScript library.

To check out the application sources from your version control

  1. Click Get from Version Control on the Welcome screen or select VCS | Get from Version Control from the main menu.

  2. In the invoked dialog, select your version control system from the list and specify the repository to check out the application sources from.

To download the dependencies

  • Click Run 'npm install' in the popup:

    Opening an Angular application and downloading the dependencies from package.json

Using AngularJS Router state diagrams

You can see a diagram illustrating the relations between views, states, and templates in AngularJS applications that use ui-router.

To generate and view a diagram

  • Open the desired file in the editor, and then choose Diagrams | Show AngularJS ui-router State Diagram from the context menu. JetBrains Rider generates a diagram and shows it in a separate editor tab.

To navigate from an element in the diagram to the code that implements this element

  • Select it and choose Jump to Source from the context menu.

Last modified: 27 July 2020