Here’s a little step-by-step guide to get started with learning Angular 6. My preferred editor is Visual Studio Code so let’s get go! 🙂
1) Install packages the right way
I would strongly recommend to begin with Angular’s best practices. Using Angular CLI makes your life easy – it already follows their best practices!
So: begin with …
2) Installing NVM – “Node Version Manager”
Why? Because using Node Version Manager fixes a lot of issues with Angular CLI. Here’s how to install it on Windows machines and here’s how to install on Linux/OS. For Windows go to the releases page and find Latest release. Under Assets you can download the file nvm-setup.zip and install it.
Now you can…
3) Install Node.js via NVM
Node.js is the compiler. Important: don’t use the download from Node.js since that would install Node.js paralell and not managed via NVM. Since NVM has Node.js “on board” you can install it by simply entering nvm install latest in the command line interface. Now switch to use this latest specified version by entering nvm use <version>:
This is my console output:
H:\>nvm use 10.10.0 Now using node v10.10.0 (64-bit)
4) Install Angular CLI
Here’s the GitHub guide how to install it. Please take care of the prerequisites.
That’s it! As David Walsh wrote – see link:
nvm has been a lifesaver for me, especially when troubleshooting issues in projects where the user may have more than one Node.js version.