Blog Detail

  • Home
  • Basic Angular CLI comments

Basic Angular CLI comments

In this blog I gave you some basic important angular cli comments that might be very useful for you to create and develop the angular project or application.

Angular CLI comments

  • Create new angular project
    • ng new <project_name>
  • Create new component
    • ng generate component <component_name> (or) ng g c <component_name>
  • Create new service
    • ng generate service <service_name> (or) ng g s <service_name>
  • Create new Page
    • ng generate page <page_name> (or) ng g p <page_name>
  • Add routing module
    • ng generate module <module_name> –routing (or) ng g m <module_name> –routing
  • Run the application in default port <4200>
    • ng serve
  • Run the application in specific port
    • ng serve –port 4100
  • Build the angular project for DEV environment
    • ng build
  • Build the angular project for PROD environment
    • ng build –prod
  • Check angular version
    • ng version
  • Add the external module in angular project.
    • ng add <therid_partiy_module>

Write a comment