Angular 5 WebStorm Run Configuration

Viewed 11611

I'm surprised to see Angular does not yet have an entry in Jet Brain's IDE, WebStorm, which run config do you guys use?

I want to execute: ng serve

but Maybe there's a better option?

one like vue's npm run dev which opens up a page in your default browser at the served address?

this page didn't hit run configs, https://www.jetbrains.com/help/webstorm/angular.html

UPDATE :

for clarification I'm talking about making a one click run button like you can for react and vue apps :

enter image description here

2 Answers

Please see https://blog.jetbrains.com/webstorm/2017/01/debugging-angular-apps/ for instructions on debugging Angular apps in WebStorm.

  • right-click your package.json, choose Show NPM Scripts
  • in NPM tool window, click the start script to start the app
  • create a new JavaScript debug configuration (Run –> Edit configurations… –> Add –> JavaScript Debug), etter http://localhost:4200/ into the URL field, press Debug

Just open package.json and add the script you want. You can add any script in "script" section. The add your script from the configurations.

Related