Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running AngularJS app in WebStorm

Its been about a month since I started using AngularJS. I used to write my codes in SublimeText2 but i wanted to use WebStorm since it claimed to be more AngularJS friendly. I wrote a simple Hello World app and tried to run it but i couldn't get any hint of how to do it. I also don't have any knowledge about Node.js.

  • Do i need Node.js to run app on WebStorm?
  • Is Node.js a server?
I tried going through tutorials on WebStorm page and also read few articles on Node.js but couldn't understand it. Can anyone explain it in a simple and understandable way?
like image 728
dup.titung Avatar asked May 10 '14 05:05

dup.titung


People also ask

How do I run a project in Angular WebStorm?

Generate code with Angular SchematicsSelect File | New from the main menu or press Alt+Insert in the Project tool window, and then select Angular Schematic. From the list, select the relevant schematic. In the dialog that opens, specify the name of the schematic to be generated and additional options, if necessary.

How do I run an Angular project in Intellij?

Select File | New | Project from the main menu or click the New Project button on the Welcome screen. In the left-hand pane, choose Angular CLI. Specify the project name and the folder to create it in. In the Node Interpreter field, specify the Node.

How do I start building an angular application with WebStorm?

The recommended way to start building a new Angular application is Angular CLI, which WebStorm downloads and runs for you using npx. As a result, your application is bootstrapped with a ready to use TypeScript and Webpack configuration.

How do I run an angular app in NPM?

Run an Angular application Select the Angular CLI Server run configuration from the list on the toolbar and click next to the list. Alternatively, run npm start in the Terminal Alt+F12 or double-click the start task in the npm tool window (View | Tool Windows | npm).

How do I run an angular application in terminal?

To run an Angular application. For Angular CLI applications, select the Angular CLI Server run configuration from the list on the toolbar and click next to the list. Alternatively, run npm start in the Terminal Alt+F12 or double-click the start task in the npm tool window ().

How to run an angular application from a Webpack server?

Run an Angular application 1 Select the Angular CLI Server run configuration from the list on the toolbar and click next to the list.#N#Alternatively,... 2 Wait till the application is compiled and the Webpack development server is ready.#N#The Run tool window or the Terminal... More ...


1 Answers

You can open your HTML+JS application in the selected browser in WebStorm by clicking on the browser icon on the top right corner of the editor tab with index.html file opened (or any other html file you'd like to open in browser). enter image description here

The same action could be done from the file context menu: Open in - Browser. WebStorm will automatically start built-in web server for your convenience.

Note that you still can go to your project folder and execute your particular HTML file from there, the same way you would do it with the text editor.

Read more on working with AngularJS in WebStorm in this blog post.

If you have back-end in Node.js for your app, then you, of course, need Node.js installed. To run your node web app you need to create Node.js run configuration. More on it here.

like image 165
Ekaterina Prigara Avatar answered Nov 09 '22 07:11

Ekaterina Prigara