Angular 2 Installation CLI setup environment

Angular 2 Installation CLI setup environment

Today, We want to share with you Angular 2 Installation CLI setup environment.
In this post we will show you Angular 2 installation step by step Javascript Example, hear for Angular 2 or Angular Local Development Environment Setup we will give you demo and example for implement.
In this post, we will learn about Setting Up Your First Angular 2 Project with an example.

Why to use Angular 2?

*] easier to understand.
*] minimal memory overhead

angular 2 : Features

faster and easier than Angularjs 1.

focused on mainly mobile apps

Source Code structure is very easy tosimplified

Simple Hello World Example : step By Step

Step 1 : create a directory/folder

mkdir infinityknow

READ :  Angular Keep session alive Timeout management

cd infinityknow

step 2 : Creating Configuration Files


  "compilerOptions": {
    "target": "es5",
    "module": "system",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  "exclude": [

step 3 : create a file : typings.json


E-junkie: Sell digital downloads online

E-junkie Provides a Copy-paste buy-now, and cart buttons for selling downloads, codes and tangible products on any website, blog, social media, email and messenger!

Also see:

  1. The Top 10+ Best Webinar Software Platforms For 2020-2021
  2. Build Your Future Godaddy Careers And Jobs
  3. Introduction To Web Hosting Services

  "globalDependencies": {
    "core-js": "registry:dt/core-js#0.0.0+20160602141332",
    "jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
    "node": "registry:dt/node#6.0.0+20160621231320"

step 4 :create a file : package.json


  "name": "infinityknow",
  "version": "1.0.0",
  "scripts": {
    "start": "concurrent \"npm run tsc:w\" \"npm run lite\" ",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "typings": "typings",
    "postinstall": "typings install"
  "license": "ISC",
  "dependencies": {
    "angular2": "2.0.0-beta.7",
    "systemjs": "0.19.22",
    "es6-promise": "^3.0.2",
    "es6-shim": "^0.33.3",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.2",
    "zone.js": "0.5.15"
  "devDependencies": {
    "concurrently": "^2.0.0",
    "lite-server": "^2.1.0",
    "typescript": "^1.7.5",

step 5 : command prompt to run

-> npm install

READ :  Laravel 6 FirstorCreate Increment and update column using Eloquent

step 6 : Creating Our First Angular Component

mkdir app
cd app

step 7: create a file app/environment_app.component.ts

import {Component, View} from "angular2/core";
   selector: 'my-app'
  template: '<h2>My First Angular 2 App</h2>'
export class AppComponent {

step 8 : create a file : environment_main.ts


import {bootstrap} from "angular2/platform/browser"
import {AppComponent} from "./environment_app.component"

step 9 : create a main file : index.html


    <title>my angular2 First Application : Hello World</title>
    <a href=""></a>
    <a href=""></a>
    <a href=""></a>
    <a href=""></a>
    <a href=""></a>
    <a href=""></a>
    <a href=""></a>
        transpiler: 'typescript',
        typescriptOptions: { emitDecoratorMetadata: true },
        packages: {'app': {defaultExtension: 'ts'}},
        map: { 'app': './angular2/src/app' }
            .then(null, console.error.bind(console));

   Simple Loading.......
 <hr />
<h1>Solution of AngularJs All Problems For</h1>
<a href="">My First Web-Application in angularjs, So I am very happy and 1000+  more then people are used of </a>

Step 10 : run your application

npm start

READ :  Angular 6 Tutorial with Top 10 Examples