angular2 step by step #1 - environment setup

Very general steps for new angualr2 developers:

install
  node.js\npm   
  check version
    node -v (7.2.0)
    npm -v (4.0.2)

install angular-cli (npm install)
  latest: https://github.com/angular/angular-cli/releases   
  check version     ng -v (cli: 1.0.0-beta.21)

Create angular2 project
  ng new

Run WebSite
  ng serve
  "ng serve" will lunch the web application, however for other hosting environment, need to build the application for production version.

Deployment

  ng build (don't use any envinronment for now. eg ng build --prod)  

  index.html before and after build.

 

Copy dist folder to hosting environment. eg (IIS, apache, etc)

posted @ 2017-02-10 16:09  chen.s  阅读(116)  评论(0编辑  收藏  举报