AngularJS: Create angular application using angular-cli

By | November 10, 2018




Install Node.JS from

Check versions of node and node package manager(npm) br executing below commands:

NOTE: Angular apps depend on features and functionality provided by libraries that are available as npm packages.

Install the Angular CLI

You can use the Angular CLI to create projects, generate application and library code, and perform a variety of ongoing development tasks such as testing, bundling, and deployment.

Install the Angular CLI globally using the below command:

That’s all.

Now, you can create an angular application using the below command:

NOTE: The Angular CLI installs the necessary Angular npm packages and other dependencies.

Serve the application

The ng serve command launches the server, watches your files, and rebuilds the app as you make changes to those files.

The –open (or just -o) option automatically opens your browser to http://localhost:4200/.

Components are the fundamental building blocks of Angular applications. They display data on the screen, listen for user input, and take action based on that input.

Angular-CLI created the first Angular component for you. It is the root component, and it is named app-root.

You can make changes as per your requirement.

That’s it. :)

Leave a Reply

Your email address will not be published. Required fields are marked *