Install NPM and Nodejs
First method (traditional)
Create an Angular project need to install npm( nodejs) and angular cli
Get binnary nodeJs's file to install nodejs and npm
If you are in Windows environment, just click and install .exe file
Into Linux environment,
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
Second method (New)
You can use nvm to install node (npm). This tools let you switch between multiple version of node :
install nvm links
nvm install 16 (mean install nodejs version 16)
nvm use 16 (mean use the version 16)
nvm install 14 (mean install nodejs version 16)
nvm use 14 (mean install nodejs version 16)
Install Angular CLI
install angular in you general context
npm install -g @angular/cli
Node --version
npm --version
Angular commands
Create new angular project
ng new name_of_the_project
if you have a remote project
git clone name_of_the_project
npm install
To build the project. The build artifacts will be stored in the dist/ directory.
Run ng build
Running unit tests
Run ng test
to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.