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.
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.
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.
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.
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).
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 ().
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 ...
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With