Angular CLI is one of the best thing provided by Angular. It stands for Command Line Interface and it can be used for creating angular apps. It is recommended to use angular cli for creating angular apps.
By using Angular CLI, you don’t need to spend time installing and configuring all the required dependencies and wiring everything together. All this can be done with some very basic and simple commands.
Also Read: Best Angular Interview Questions
How to install Angular CLI ?
Before using the Angular CLI you must need to install it. You can easily install Angular CLI by using the command given below
npm install @angular/cli@latest
Here are the list of things you can do with Angular CLI
- Create new angular projects: ng new
- Generating Components, Directives & Services: ng generate/g
- ng generate class my-new-class: add a class to your application
- ng generate component my-new-component: add a component to your application
- ng generate directive my-new-directive: add a directive to your application
- ng generate enum my-new-enum: add an enum to your application
- ng generate module my-new-module: add a module to your application
- ng generate pipe my-new-pipe: add a pipe to your application
- ng generate service my-new-service: add a service to your application
- Running the Project: ng serve
How to update the older version of your Angular CLI ?
you can easily update your Angular CLI to a new version, go through the following steps:
npm uninstall -g @angular/cli npm cache clean npm install -g @angular/cli@latest
By now, you would have realized the importance of angular-cli in the overall app development process. I would suggest you to try all the commands that I have listed above for making your next angular web application.