ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

docs: ionic serve vs ng serve

Open rajinder-yadav opened this issue 1 year ago • 1 comments

The document doesn't explain what is so different between using 'ionic serve' vs 'ng serve'. If there is no difference, can you please just consider getting rid of 'ionic serve' for angular applications?

I find typing 'ng s' a lot quicker and easy. However having a different way, to start an ionic + angular app leaves room for confusion. As if the it's doing something extra, which again the document fails to detail.

rajinder-yadav avatar Apr 13 '24 22:04 rajinder-yadav

I don't think removing it is going to be implemented.

The point is that ionic serve works for all ionic projects, be it vue, react, angular, you can always rely on typing ionic serve.

You can see the raw code here:

https://github.com/ionic-team/ionic-cli/blob/fbeac60cdde6f6504900e9c403fa4e79528ca067/packages/%40ionic/cli/src/lib/project/angular/serve.ts

It mostly just translates some standardised ionic params into the ng equivalents from what I can tell, but it does do some things for cordova projects.

If its really annoying you there are various ways to set up a shorter alias for ionic serve, depending on your os/terminal, such as in ~/.zshrc:

alias ios="ionic serve"

rtpHarry avatar Nov 13 '24 08:11 rtpHarry