Skip to content

Instantly share code, notes, and snippets.

@VikashSaharan1
Last active July 22, 2024 12:40
Show Gist options
  • Select an option

  • Save VikashSaharan1/e5b7dfd3b3084a1385270e8896aa7174 to your computer and use it in GitHub Desktop.

Select an option

Save VikashSaharan1/e5b7dfd3b3084a1385270e8896aa7174 to your computer and use it in GitHub Desktop.
Angular CLI commands list
Install Angular CLI
  npm install -g @angular-cli
Check Version
  ng version

Angular app initialize

  # create a new application in the current directory
      ng init

Angular New App creation

  # create a new directory and run ng init inside the new directory
      ng new <app-name>

Angular serve application

  # first goto current directory there is an application and put this command
      ng serve

Angular ng genrate

  # if you want to genrate a new component
      ng generate component <component-name> 
      ng g c  <component-name> 

Angular ng genrate

  # if you want to genrate a new component
      ng generate component <component-name> 
      ng g c  <component-name> 

Angular ng genrate

  # if you want to genrate a new component
      ng generate component <component-name> 
      ng g c  <component-name> 
  # generate class
      ng generate class <class-name>
      ng g c <class-name>
  # generate class
      ng generate class <class-name>
      ng g cl <class-name>  
  # generate directive
    ng generate directive <directive-name>
    ng g c <directive-name>
  # generate enum
    ng generate enum <enum-name>
    ng g c enum
  # generate module
    ng generate module <module-name>
    ng g c <module>
 # generate pipe
    ng generate pipe <pipe-name>
    ng g p <pipe>
 # generate service
    ng generate service <service-name>
    ng g p <service-name>
  
@VikashSaharan1

VikashSaharan1 commented Jul 22, 2024 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment