Sharing Top Content from the Angular-sphere.

Getting Started With Angular 2 Using Angular CLI

Getting Started With #Angular2 Using #AngularCLI by @raj2511984 cc @CsharpCorner

  • Angular CLI is a command line interface tool that can create a project, add files, and perform a variety of ongoing development tasks such as testing, bundling, and deployment.
  • Before moving ahead, if you want to read my previous Angular 2 samples without Angular CLI, here is the list, – – Step 1 – – – – First of all make sure your machine has Node.js and npm installed.
  • After installing Angular CLI, now create a new project.
  • First of all provide project directory path and hit enter.
  • In this article, I explained the very basic steps of how to get started with Angular CLI.

In this article, I will demonstrate how to install Angular CLI and how to set up an Angular project and run it.

Why Angular CLI?

Angular CLI is a command line interface tool that can create a project, add files, and perform a variety of ongoing development tasks such as testing, bundling, and deployment.

Before moving ahead, if you want to read my previous Angular 2 samples without Angular CLI, here is the list,

Getting Started,

Follow these steps,

Step 1

First of all make sure your machine has Node.js and npm installed. You can install it from here.

https://nodejs.org/en/download/

Step 2

Now install Angular CLI using a command prompt. Install Angular CLI globally.

After installing Angular CLI, now create a new project. First of all provide project directory path and hit enter.

Step 4

Then give this command and hit enter, here fourth-sample is my application name, you can give any name.

Step 5

Wait until all files are added.

Step 6

If you check directory then all files are added like this, it means the application is created and all required files are added.

Step 7

Now run the project, go to project directory using command prompt and hit this command and wait until command is completed.

Step 8

As you can see, the application is running in the browser without writing any lines of code or added built in…

Getting Started With Angular 2 Using Angular CLI