# AngularJS

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

> **TL;DR**
> Required plugins:
>
>
>
> `JavaScript and TypeScript` -    the plugin is bundled with GoLand and enabled by default.
>
>
>
> `Angular and AngularJS` -    install the plugin on the Settings | Plugins page.

[AngularJS](http://angularjs.org/) also known as Angular 1 is a framework for developing single page web applications. GoLand 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

Procedure:

1. Download and install [Node.js](http://nodejs.org/#download).

2. Make sure the  JavaScript and TypeScript plugin is enabled in the settings.  Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open settings and then select `Plugins`.  In the search field, type JavaScript and TypeScript. For more information about plugins, refer to [Managing plugins](managing-plugins.html).

3. Install and enable the Angular and AngularJS plugin on the Settings | Plugins page, as described in [Installing plugins from
JetBrains Marketplace](managing-plugins.html#install_plugin_from_repo).

## Create a new AngularJS application

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

Procedure: Download AngularJS dependencies

* In your command-line shell or in the embedded Terminal (`Alt+F12` (Windows), `⌥ F12` (macOS), `⌥ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ T` (macOS System Shortcuts), `Alt+F12` (XWin), `Alt+F12` (GNOME), `Alt+F12` (KDE), `Alt+F12` (Emacs), `Alt+F12` (Sublime Text), `⌥ F12` (Sublime Text (macOS)), `Ctrl+`` (VSCode), `⌃ `` (VSCode (macOS))) , type:

`npm install`

* Alternatively, select Run 'npm install' from the context menu of the `package.json` file in your project root.

> **Tip:**
> AngularJS dependencies contain AngularJS code and the tools that support development and testing.

Procedure: Create an empty GoLand project

1. Select `File | New | Project` from the main menu.

2. Select Angular CLI project. The menu item is available only after you have installed the Angular and AngularJS plugin.

3. Name the new project and change its location if necessary, then click Create.

Procedure: Install and configure AngularJS in an empty project manually

1. Download the AngularJS framework at [http://angularjs.org/](http://angularjs.org/).

2. Open the empty project where you will use AngularJS.

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

1.

In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))), go to `Languages & Frameworks | JavaScript | Libraries`.

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 (![the Add button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg)) next to the list of library files and select Attach Files… or Attach Directories…, depending on 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.

GoLand 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](http://en.wikipedia.org/wiki/Minification_%28programming%29) `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](configuring-javascript-libraries.html).

Procedure: Install AngularJS in an empty project with Bower

1. Open the empty project where you will use AngularJS.

2. Install [Bower](http://bower.io/) as described in [Bower](using-bower-package-manager.html).

3. In your command-line shell or in the embedded Terminal (`Alt+F12` (Windows), `⌥ F12` (macOS), `⌥ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ T` (macOS System Shortcuts), `Alt+F12` (XWin), `Alt+F12` (GNOME), `Alt+F12` (KDE), `Alt+F12` (Emacs), `Alt+F12` (Sublime Text), `⌥ F12` (Sublime Text (macOS)), `Ctrl+`` (VSCode), `⌃ `` (VSCode (macOS))) , type `bower install angular` to install the package as a project dependency.

## Start 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](configuring-javascript-libraries.html#ws_js_custom_third_party_library).

Procedure: Check out the application sources from your version control

1. Click Clone Repository on the Welcome  screen.

Alternatively, select  `Git | Clone…` or `VCS | Get from Version Control` from the main menu.

Instead of Git in the main menu, you may see any other Version Control System that is associated with your project. For example, Mercurial or Perforce.

![check_out_from_vcs](https://resources.jetbrains.com/help/img/idea/2026.3/go_check_out_from_vcs.png)

Procedure: Download the dependencies

* Click Run 'npm install' in the popup:

![Opening an Angular application and downloading the dependencies from package.json](https://resources.jetbrains.com/help/img/idea/2026.3/ws_npm_yarn_package_run_npm_install.png)

### Project security

When you open a project that was created outside GoLand and was imported into it, GoLand displays a dialog where you can decide how to handle this project with unfamiliar source code.

![Untrusted project warning](https://resources.jetbrains.com/help/img/idea/2026.3/go_webpack_project_security_warning_2021_3_1_dark.png)

Select one of the following options:

* Preview in Safe Mode: in this case, GoLand opens the project in a preview mode. It means that you can browse the project's sources but you cannot run tasks and script or run/debug your project. GoLand displays a notification on top of the editor area, and you can click the Trust project… link and load your project at any time.

* Trust Project: in this case, GoLand opens and loads a project. That means the project is initialized, project's plugins are resolved, dependencies are added, and all GoLand features are available.

* Don't Open: in this case, GoLand doesn't open the project.

Learn more from [Project security](project-security.html).

> **Tip:**
> Projects created from the Welcome screen or via `File | New | Project`  as described in  are automatically considered trusted.

## Use AngularJS Router state diagrams

You can see a diagram illustrating the relations between views, states, and templates in AngularJS applications that use [ui-router](https://ui-router.github.io/ng1/).

Procedure: 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. GoLand generates a diagram and shows it in a separate editor tab.

Procedure: Navigate from an element in the diagram to the code that implements this element

* Select the element and choose Jump to Source from the context menu.

## See also

### Procedures

[Angular](angular.html) [Bower](using-bower-package-manager.html) [Live templates](using-live-templates.html) [Style Sheets](style-sheets.html)

