0 votes
in Angular by
What is Angular CLI?

2 Answers

0 votes
by

Angular CLI is a short form for Angular Command Line Interface. It is a command-line interface to scaffold and build angular apps using node.js style modules.

To use Angular CLI, we have to install it by using the following npm command:

  1. npm install @angular/cli@latest  

Following is a list of some useful commands which would be very helpful while creating angular projects:

  • Creating New Project: ng new
  • Generating Components, Directives & Services: ng generate/g
  • Running the Project: ng serve
0 votes
by

Angular CLI(Command Line Interface) is a command line interface to scaffold and build angular apps using nodejs style (commonJs) modules. You need to install using below npm command,

npm install @angular/cli@latest

Below are the list of few commands, which will come handy while creating angular projects

Creating New Project: ng new

Generating Components, Directives & Services: ng generate/g The different types of commands would be,

  1. ng generate class my-new-class: add a class to your application
  2. ng generate component my-new-component: add a component to your application
  3. ng generate directive my-new-directive: add a directive to your application
  4. ng generate enum my-new-enum: add an enum to your application
  5. ng generate module my-new-module: add a module to your application
  6. ng generate pipe my-new-pipe: add a pipe to your application
  7. ng generate service my-new-service: add a service to your application
  8. Running the Project: ng serve

Related questions

0 votes
asked Sep 18, 2019 in Angular by john ganales
0 votes
asked Sep 16, 2023 in Angular by JackTerrance
0 votes
asked Sep 22, 2023 in Angular by DavidAnderson
...