5

I created an angular2 project using angular-cli. Project is working fine.
I used ng serve command to run it locally for development. Below is the snapshot of CLI after running the project:
Angular CLI running
Now I want to create a new component using ng generate component command. I have to stop it first using Ctrl + C and then create the component and then start it again. Its time consuming. Is there any other and better way to do it?

Robin-Hoodie
  • 4,886
  • 4
  • 30
  • 63
awebartisan
  • 1,424
  • 16
  • 27

2 Answers2

7

Open up a second cli window to run ng serve.

RMuesi
  • 2,852
  • 1
  • 24
  • 27
6

Please note if you're using VSCode you can open a second terminal window by clicking the + symbol and then toggle between them using the dropdown.

enter image description here

Other similar features may exist in other editors, of you can of course open a standard terminal window of your choice.

Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689