Working with Angular CLI
We will look at how to set up a development environment for building applications with Angular.
To build Angular applications, you need many dependencies, a web development server, packages, all connected to each other. But doing all this from scratch every time is tedious. That’s where Angular’s command-line tool, the Angular CLI, comes in.
The Angular CLI provides us with all the required dependencies. Boilerplates take care of the webpack
configuration, unit test configuration, and transpile TypeScript
files to JavaScript.
To install the Angular CLI on your local machine, you can use the node package manager npm.
You can download Node.js
from your browser using the link as per your operating system.
Install Node.js
https://nodejs.org/en/download/
As per your operating system, choose the right source file to download from the options given:
Once installed, you can check to confirm if Node.js has been installed properly on your machine, using the command:
node -version OR node -v
When you install Node.js
, it also installs the package manager npm
. To check if npm
is installed properly on your machine, use the command:
npm -version OR npm -v
Now, you can move forward with installing the Angular CLI, using the command:
npm install -g @angular/cli
To check if Angular CLI is installed properly, use the command:
ng version OR ng v
The Angular CLI version
As you ...