Tuesday, October 4, 2016

Setup angular 2 environment

  • Prerequisite: Install Node.js
  • Step 1: Create the app’s project folder and define package dependencies and special project setup
  • Step 2: Create the app’s Angular root component
  • Step 3: Create an Angular Module
  • Step 4: Add main.ts, identifying the root component to Angular
  • Step 5: Add index.html, the web page that hosts the application
  • Step 6: Build and run the app
  • Make some changes to the app

  Tips for installation

  1) Need to have the latest version on npm. npm command to get the the latest version of             npm from the server
             npm install npm -g
    2) Create development folder (angular2-quickstart)
    3) Create package.json
    4) run the below npm command
       npm install
   Note: During installation we can  ignore 
            npm WARN messages
        *** we should not get    
          npm ERR! messages at the end of npm install
   After successful installation

  5) npm command to Install typescript 
      npm install -g typescript

Note you can also clone or download the quick-start seed from 

1) The seed folder would have the following file structure

2) Open command prompt and run npm install

3) After installation we would notice node_modules folder as shown below

4)Install Typescript

5) Start the lite server


No comments:

Post a Comment