In this article, we will see Commonly Used Angular Commands
- Get npm version
npm -v
- Get node version
node -v
- Get angular CLI version
ng v
- Install Angular CLI globally
npm i @angular/cli -g
- Install Angular CLI
npm i @angular/cli
- Get help in the terminal
ng help
- Create Angular Project
ng new project-name
- Create Angular Component
ng g c component-name
- Create Angular Service
ng g s service-name
- Create Angular Module
ng g m module-name
- Create a module with routing
ng g m module-name --routing
- Remove node modules
rm -rf node_modules
- Install the latest version of Angular CLI
npm install --save-dev @angular/cli@latest
- Update Angular CLI
ng update @angular/cli
- clean cache
npm cache clean
- Install TypeScript latest version
npm install -g typescript@latest
- Install node module in angular project
npm install