Angular 4 Setup Guide

Angular 4 Setup Guide for Development Environment!

Angular 4 Setup Guide  -

Step 1. Setup the Development Environment
1.     Install Node.js and NPM  -If you are not already have on your machine!
2.     Then you Install the Angular CLI globally!

npm install -g @angular/cli

Step 2 - Navigate to project directory and Create a new project!
$ cd ~/Dev/
$ mkdir appDir && cd appDir 
$ ng new my-app

Note - ng new takes time to run!

Step 3 - Navigate to project & Run Local Server!
$ cd /path/to/your/newly/created/app/

$ cd ~/Dev/appDir/my-app/
$ ng serve

Open local host - http://localhost:53865/

Note –The ng serve command is used to launches the server, watches your files and rebuilds the app as you make changes to those files!

Step 4 -Edit Project and Save files

 - Open file in appDir/my-app/src/app/app.component.ts, EDIT and SAVE
import { Component } from '@angular/core';

   selector: 'app-root',
   templateUrl: './app.component.html',
   styleUrls: ['./app.component.css']
 export class AppComponent {
   title = 'Welcome you in Angular 4!';

Step 5. Test build
ng build

I hope you are enjoying with this post! Please share with you friends! Thank you!!!

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like
Post a Comment Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book