Hello Everyone :)
Let us have a quick learning about the Angular CLI.
To start work with one of the popular frontend frameworks Angular, one must know about the Angular CLI tool it provides.
Angular CLI
The Angular CLI is a command-line interface tool that is used to initialize, develop and maintain Angular applications directly from a command shell.
The Angular CLI is used for much more than just creating an Angular project. It can be used to create components, services, pipes, directives and more. Also it helps in building, serving, testing etc. CLI itself is quite something to learn about, it makes Angular development workflow much easier and faster.
Prerequisites to work with Angular CLI
Angular CLI, just like most current frontend tools, is developed on top of Node.js.
NPM is one of the prerequisites that is required before installing Angular CLI. Angular will need to have Node.js in your system for it to run. Node.js can be installed from the official website https://nodejs.org/en/
After downloading Node.js open the terminal or the command prompt to do the installation testing of Node and NPM using the below commands.
- To check the successful installation of Node.js use the command node.
- Then install Node Package Manager(NPM) using the command npm install (or) npm i.
- To know the npm version installed use the command npm -version (or) npm -v.
With this done we are ready to do the installation of Angular CLI using the below listed commands,
- Install Angular CLI globally using the command npm install -g @angular/cli (or) sudo npm install -g @angular/cli.
- To know the version of Angular CLI use ng --version command.
The command ng help lists the list of commands provided by the Angular CLI along with its usage.
If in case of any problem or a malfunction that requires you to uninstall the Angular CLI, follow the below commands.
npm uninstall -g @angular/cli
npm cache clean
Having Angular CLI in support one can quickly develop and maintain Angular applications with ease.
Thank you! Hope you find it useful.