Welcome back to a new blog post. Throughout my uses of npm and creating applications in angular, I have found a set of commands that I keep coming back to to use again and again. While they're all used very commonly, it might be heard to remember them all of the time. So without any further ado, here they are for your convenient use! Hope it helps.
To install node.js
# To install node.js
# Install from the below official download link.
# https://nodejs.org/en/#download
To install typescript
# To install typescript
npm install typescript -g
To install angular CLI
# To install angular CLI
npm install @angular/cli -g
To check angular version
# To check angular version
ng version
To check the existing installed paths of node.js
# To check the existing installed paths of node.js
where node
To create new angular app
# To create new angular app
ng new <app_name>
To create module
# To create module
ng g module <module_name>
To install dependencies
# To install dependencies
npm install
To run or serve app
# To run/serve app
#To serve app => cd to the app folder and run
#Note:- npm start also will call ng serve and start the application.
ng serve
To create service
# To create service
ng gnerate service service_name
To generate interface
# To generate interface
ng generate interface git-search
To install latest AngularFire and Firebase for latest Angular CLI 7.x
# To install latest AngularFire and Firebase for latest Angular CLI 7.x
npm install firebase @angular/fire --save
To skip/avoid long path in terminal (shortcut)
# To skip/avoid long path in terminal (shortcut)
prompt $$
Thanks for reading this post!
I hope this article is informative and helpful in some way. If it is, please like and share this article.
Happy learning!
Top comments (0)