Skip to main content

Angular 2/4 Setup, install and Build Guide

This is a step-by-step setup guide to setup Angular Development Environment.


1. Install Node.js (Note:- Below Instruction for Debian and Ubuntu-based Linux distribution)

NOTE: If you are using Ubuntu Precise or Debian Wheezy, you might want to read about running Node.js >= 6.x on older distros.     

For Node.js 8.x LTS(Long Term Support)

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

sudo apt-get install -y nodejs



For Node.js 9.x Current

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

sudo apt-get install -y nodejs

After Installing Node.js, the  NPM(Node package manager) should automatically be installed.

Verify installation using commond

 npm --version

2. Install Angular CLI via npm:

npm install -g @angular/cli


3. To create a new project:

ng new myapp 

4. To run the Angular app:

cd myapp
ng serve

Note:- This will start a server on localhost:4200 by default. ng serve watches your files for changes and rebuilds the app as you save changes. If you open that up in your browser you should be able to see the below screen.




5. To build the Angular app:

This creates a new folder called "/dist" in your app root directory which is your entire app compiled and ready to ship.

ng build

creates a production-ready version of your app

ng build --prod


Comments

Popular posts from this blog

Maa

Maa se rishta aisa banaya jaae, Jisko nigaaho me bithaya jae, Rahe uska mera rishta kuch aisa ki, Wo agar udaas ho to humse bhi muskuraya na jaae…

Woh Apne Mehandi

Woh Apne Mehandi Wale Haath Mujhe Dikha Kar Royi, Ab Main Hoon Kisi Aur Ki Yeh Mujhe Bata Kar Royi. Pehle Kehti Thi Ke Nahi Ji Sakhti Tere Bin, Aaj Phir Se Woh Baat Dohra Kar Royi. Kaise Kar Loon Uski Mohabbat Pe Shak Yaaro! Woh Bhari Mehfil Mein Mujhe Gale Laga Kar Royi.

How to do factory reset on Moto series android phone

The following steps contain instructions on how to perform a factory reset on your Moto Series Android Phones. It is recommended to make a backup before you reset to the factory settings. This to prevent personal data to be lost. 1. Go to the Start screen. Choose the menu symbol. 2. Scroll down.  Choose   Settings . 3.  Scroll down. Choose   Backup & reset . 4. Choose   Factory data reset . 5.  Choose   RESET PHONE .      Optional: tick  Erase SD card . 6.  Choose   ERASE EVERYTHING . 7.  All data and settings saved on the Motorola Moto G4 will be deleted. The Motorola Moto G4 will automatically reset and reboot.