Cli Commands

In this tutorial, we learn about some basic commands which are commonly used in Angular cli.

If you don’t know how to install angular cli then you should check out this angular cli and tooling setup.

ng new

This command is used to create a new angular project.

ng new myapp

ng generate

It is used to generate the new components and routing modules.

ng generate component myfirst-component // to create a new component

ng serve

It is used to start the development server so that you can develop your favorite app on your pc.

ng test

It is used to run the unit tests of your project.

ng build

It is used to build the app for production use.