Angular Sample Application – Part 1

Hello Geek, Good Morning. I hope you have a great weekend going. I wake up early today to write something about Angular.

I am going to post about how to create a sample application in Angular. That will be a starter in your Angular learning. 🙂

So, let’s start.

To run Angular application, you need the latest or any stable version of Node.js in your development machine. Also, you need a npm package manager.

What is Node.js?

Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine.

What is npm?

npm is a package manager for the JavaScript programming language. It is the default package manager for the JavaScript runtime environment Node.js

So if you don’t have installed Node.js you can get it from here: https://nodejs.org/

Now, you have Node.js. Next thing you need to install Angular CLI, that will help you to create an Angular project, libraries and also will help you to build and deploy your projects.

You need to install Angular CLI globally. To do this open your console or terminal and write the following command.

npm install -g @angular/cli

Where,

npm: stands for the npm package manager

install: which is action to do by npm

-g: action will take globally

@angular/cli: is a package name

Now we will create a new application using Angular CLI.

Open the console or terminal and write one command.

ng new sampleapp

It will create a new folder sampleapp and it will contain your sample application.

Now, type cd sampleapp. It will open sampleapp folder.

To run the Angular application you need to run the following command.

ng serve

The angular application will run on the browser with http://localhost:4000

Now, let’s learn how to create a component in the Angular.

Click here to read – Angular Sample Application – Part 2.

 

Author: Jaydip Panchal

Hello, This is jaydip panchal here, who do code, dream code, eat code, drink code, walk code. #CodeWithJaydip #CodeWithGeek

Leave a Reply

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