Install NodeJS, Angular CLI, VSCode and Setup Angular Workspace Environment
Before we begin our journey with Angular, lets get equipped with all the required tools. In this article we will go through all the softwares and setup you require to create an Angular application.
To develop angular apps we must ensure our machine has NodeJS, npm or yarn, Angular CLI and an IDE or Code Editor.
Install NodeJS
NodeJS is a JavaScript runtime environment. Angular uses it for several purposes e.g.
- Transpiling TypeScript to JavaScript, SCSS to CSS, SASS to CSS etc.
- Building and packing final JS sources.
- Provide runtime environment for angular to run.
To install nodejs hit over nodejs downloads section and select appropriate download bundle for your operating system. Post download and installation open terminal and run command node -v
to verify nodejs installed version.
Install Node Package Manager (Npm or Yarn)
Once you have installed nodejs, you require a package manager to install/uninstall other JS libraries. Node ships with “npm” as its default package manager. To check the npm version open terminal and hit npm -v
.
I would recommend to install Yarn (Yet Another Resource Negotiator) as your package manager. To install yarn open terminal and hit npm install --global yarn
. Once the installation completes execute yarn -v
to check the installed version.
Install Angular CLI
Angular CLI is a set of command line tools we will be using to create, run, test and build our angular app. After you have installed nodejs, npm or yarn let’s install angular. Open terminal and hit npm install -g @angular/cli
or yarn global add @angular/cli
.
Once the installation is complete hit ng --version
to verify the installed version.
Install VSCode
Finally we have all the necessary softwares installed on our machine. At last we need a code editor. You are free to choose any code editors or IDE of your choice. I would recommend VSCode for two primary reasons -
- Its open source - free to use.
- Powerful and lightweight.
To download VSCode navigate to VSCode downloads section and download required setup based on your operating system.
👏 All set, we are all good to create our first angular application.
Happy Coding 👨💻