What command aliases do you use when using Angular CLI?

Experience Level: Junior
Tags: Angular Angular CLI

Answer

The following are the most used command aliases:

  • ng v = ng version (outputs Angular CLI version)
  • ng s = ng serve (builds and serves your application)
  • ng b = ng build (compiles an Angular application)
  • ng g = ng generate (generates files - component, module, class, ...)
  • ng l = ng lint (runs linting tools)
  • ng t = ng test (runs unit tests in a project)
  • ng n = ng new (creates a new Angular application)
  • ng e = ng e2e (builds, serves, runs e2e tests)
Related Angular CLI job interview questions
Angular CLI for beginners
Angular CLI for beginners

Are you learning Angular CLI? Try our test we designed to help you progress faster.

Test yourself