Creating Angular 2 & 4 projects in IntelliJ Idea

This article shows how to setup Angular project in IntelliJ Idea 2017.1 Build #IU-171.3780.107

Currently IntelliJ Idea creates an empty project for Angular 2 and 4. For AngularJS project, IntelliJ Idea does add a boiler plate. May be JetBrains will add a boiler plate for Angular 2 and 4 in its future release(s).

Prerequisite:

  • You should have already installed Node, NPM and Angular CLI to make this work.
  • You’ll require to install Angular CLI globally.You can install Angular CLI globally using npm command:npm install -g angular-cli


Let’s start…..

Create new project by clicking “Create New Project”

Or by clicking File menu -> New -> Project

In the New Project window, select “Static Web” on the left and “Angular CLI” on the right hand side.

Select a project location, select Node interpreter; if not automatically selected by IntelliJ Idea, and finally select the Angular CLI location.

  • By default, IntelliJ Idea will name the project same as the folder selected.
  • In Microsoft Windows, by default Angular CLI is installed under C:\Users\< your windows username >\AppData\Roaming\npm\node_modules
  • I am guessing the checkbox “Create Angular 4 project” is supposed to create Angular 4 project but it does not seem to make any difference in the project setup. UPDATE: Checked with IntelliJ Idea about the checkbox “Create Angular 4 project”. Below is their response:

Hope this post helps someone.