environment setup for Angular Application

 Go to this site https://cli.angular.io     
           to install Angular CLI


To get started with the installation, we first need to make sure we have nodejs and npm installed with the latest version. The npm package gets installed along with nodejs.

Go to the nodejs site https://nodejs.org/en/


Once nodejs is installed, you can check the version of node in the command line using the command, node -v, as shown below −



To check the version of npm, type command npm -v in the terminal. It will display the version of npm as shown below.



Now that we have nodejs and npm installed, let us run the angular cli commands to install Angular  You will see the following commands on the webpage −


npm install -g @angular/cli //command to install angular 6
ng new AngularDemo // name of the project
cd AngularDemo
ng serve

Let us now check whether Angular CLI is installed or not. To check the installation, run the following command in the terminal   node -v

We will use Visual Studio Code IDE for working with Angular you can use any IDE
if you want to open project into IDE run the command
code . 
It will open into visual studio code


Now that we have the file structure for our project, let us compile our project with the following command −
ng serve


The web server starts on port 4200. Type the url http://localhost:4200/ in the browser and see the output. You will be directed to the following screen −










Comments

Popular posts from this blog

How to Integrate SB Admin 2 Template in Asp.net Mvc Application

Send mail when Rss news is published using Logic Apps - Azure portal