N.Zukowski
N.Zukowski

Reputation: 601

IntelliJ IDEA run AngularJS project

How can I run my AngularJS Application in the IntelliJ IDEA? I use the last version of the IntelliJ IDEA and I installed the AngularJS support with the IntelliJ IDEA AngularJS Plugin. I wonder, that I cannot define some Server Run/Debug Configuration (like Tomcat) to run my application.

Is there a way to do this?

EDIT: Or there is some other way to deploy the application? I cannot find any suitable Run/Debug Configuration to somehow deploy my project locally.

Upvotes: 1

Views: 6824

Answers (3)

ms_rahman
ms_rahman

Reputation: 11

To run Angular application without Tomcat/JBoss, we need to create a "JavaScript Debug" configuration. To do this, follow the instructions below.

  1. In intellij menu bar, Choose Run --> Edit Configurations
  2. Click green plus (+) sign and choose "JavaScript Debug"
  3. For the value in URL box, navigate to the index.html file by clicking the little button[...] next to URL field
  4. For the rest of the values in the form, follow the screenshot below

screenshot

Upvotes: 1

Harmelodic
Harmelodic

Reputation: 6139

A 'lisa p' says: You need an application server to run it locally on, such as JBoss.

Unless it's a static application (i.e. no dynamic content) in which case, just open your index.html file in a web-browser.

Ideally, if you wanted to continue to develop more pure AngularJS projects, then use Jetbrains' WebStorm IDE instead of their IntelliJ IDEA IDE.
IntelliJ is for Java Development, WebStorm is for Web and JavaScript Development.

Upvotes: 2

lisa p.
lisa p.

Reputation: 2158

Well, you need an application server to run the application. I'm using IntelliJ Idea with a local JBoss.

Build your modules and deploy them on the JBoss. You can even use an automated front-end build process with bower and gulp.

If you are only using javascript you don't even need a local server running, js is executed in the the browser. A JBoss, Tomcat or other application server is used for your server logic (e.g. Java code).

Upvotes: 4

Related Questions