Learn Angular2 with me (1-first experience)

Source: Internet
Author: User

0. Introduction

Angular1, as the most Popular front-end mv* framework, has brought great convenience to front-end development. However, there are still many bad places that are hard to change. The angular team developed a new angular, Angular2, based on the trends in web development and the experience gained in ANGULAR1.

1. Advantages

ANGULAR2 has made radical changes and the results are obvious.

    1. Greatly improves performance
    2. More powerful modularity
    3. Improved Dependency Injection
    4. Friendly to Web Component
    5. Native mobile Support-IOS and Android
    6. Server-side rendering, search engine optimization
2. Tool Chain

Because ANGULAR2 is future-oriented and uses a lot of technology that is not yet supported by the current mainstream browsers, it is not an easy thing to run, so we need a toolchain:

SYSTEMJS-Universal Module Loader supports JS module loading in various formats such as AMD, CommonJS, ES6, etc.

ES6-MODULE-LOADER-ES6 Module Loader, SYSTEMJS will automatically load this module

Traceur-es6 transcoding to convert the ES6 code to the ES5 code supported by the current browser. SYSTEMJS will automatically load this module.

3, Angular2 Hello worldStep1, download angular2

https://angular.io/is Angular2 's official website and we need to download ANGULAR2:NPM install Angular2 https://www.npmjs.com/package/angular2 via NPM.

STEP2, introduction of ANGULAR2
<!DOCTYPE html>
STEP3, Hello Angular
<body>  <app></app>  <script>  var App = ng.Component({    selector: ‘app‘,    template: ‘

Learn Angular2 with me (1-first experience)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.