Angular Tutorials- Development Environment Setup

Jun 25, 2019

What to expect

In this Angular Tutorials, ill tell you how you can quickly set up your development environment how to install angular cli and generate a new angular project with angular cli commands

First thing First

the base will be installing node js as all the dependencies of angular core angular cli and their sub-dependencies will be installed as the node packages and will be connected with npm

Installing Node js

Head over to nodejs.org official website of node js and based on your platform we need to install the node installer with Stable node js version. when you visit nodejs.org, you will see a page like this

Angular Tutorials- Development Environment Setup

So you will have two options to install node js. Make sure you install the LTS node js version the current node js version will have test features, but the latest breaking changes and you don't want to mess with it
so based on your platform download the installer and install node js on your pc
now to verify whether node js is installed or not we will check the version of the node which will give us the node js version on our pc

 node <span class="token operator">-</span>v 
Angular Tutorials- Development Environment Setup

Installing Angular cli

first, let answer what is angular cli
Angular CLI is a command line interface, thus 'CLI', which includes the functionality that WebPack provides. It uses Webpack to include all the packaging, importing, BrowserLink, etc., but you do not need to know how Webpack works or how it needs to be configured to run in different environments or on different types of machines. All the Webpack configuration is done completely by CLI and leaves it out of the hands of a developer unless they choose to adjust the settings themselves. In addition, CLI assists developers by generating code which follows the best practices as defined by https://Angular.io, Angular's home site.

Angular cli version

The angular cli latest version as of now is 7.3.8 to install this version we will run the command below it will install angular cli latest version globally because we have used -g flag which stands for - globally so that we can access angular cli from anywhere in our system
The other version (not recommended) which is in beta is 8.0.0-RC if you know what you are doing then you can install this current unstable version by this npm command

 npm i -g @angular/cli@latest 

so to verify if the angular cli is installed correctly on your system or not we will check the angular cli version by running

 ng --version 
Angular Tutorials- Development Environment Setup

So that's it you have your angular development environment you can go ahead and create your first angular project by running

 ng new yourawesomeprojectname 

this command will generate a brand new angular scaffolded project template for you where you can start your angular development and hit ng serve remember you have to be inside an angular-cli project in order to use the serve command.  Thanks a lot, Visit Smartcodehub for Best Angular Tutorials

Neeraj Dana

Experienced Software Engineer with a demonstrated history of working in the information technology and services industry. Skilled in Angular, React, React-Native, Vue js, Machine Learning