CoderJony

What is Angular CLI?

Angular CLI stands for Angular Command Line Interface. It is simply a package that is available on NPM (Node Package Manager).

NPM is a library that contains or hosts thousands of Node packages which we can use in our node application or for any other purpose as well.

Angular CLI & It's Usage

Angular CLI is a Node Package which you can install from NPM by using below command.

npm install -g @angular/cli

Using -g before package name will install this package globally.

Once this package is installed, you will get a Command Line Interface available on your computer that you can use to perform many useful tasks while developing an Angular 2, 4 or 5 application.

Angular CLI makes a developer's life very easy. Below are few Angular CLI commands & their descriptions.

  1. ng new my-new-app This will create a new Angular application with name my-new-app or we can say it will generate a getting started template for you.

  2. ng serve If you go to your application folder and hit this command, then it will launch your application in browser.

  3. ng build If you go your application folder and hit this command then Angular CLI in background will start building your project. If all goes well then it will bundle all TypeScript, JavaScript, CSS & HTML files into a single folder which you can use to deploy your application.

These are only few commands which I have mentioned. There are many more which you can find on Angular CLI website at https://cli.angular.io/.

Buy Me A Coffee