How to setup Angular on Ubuntu
Installation steps
1. Install Node.js
Node.js is an open-source server environment that uses JavaScript on the server.
We have to install LTS version as it’s recommended for most users. At this time latest LTS Version: 12.16.1 (includes npm 6.13.4).
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejsLatest Node.js LTS version information can be found on the Node.js website.
The installation code depending on the Node.js version can be found on NodeSource which is a Node.js Binary Distributor.
2. Update NPM
Normally, NPM will be installed with the Node.js itself. However, we can update it to the latest version using the below command.
Sometimes it’s optional but I recommend you to do it.
sudo npm install npm@latest -g3. Install the Angular CLI
sudo npm install -g @angular/cliHere we’re using sudo to avoid any permission issues that may occur.
4. Create a workspace and initial Angular application
ng new my-app5. Run the application
cd my-app
ng serve --openNow we’re good to go.
Happy Coding!
