ANGULAR2 & ANGULARJS1

Source: Internet
Author: User

The path of iteration:

June 12, the official version of Angularjs1.0.0 launched, the highlights function is basically complete, such as two-way binding, dependency injection, directives and so on

Angularjs 1.3.x abandon support IE8 browser, launch single binding syntax

Angularjs 1.5.x adds a similar component writing experience, mainly to pave the transition ANGUALR2

angularjs1.x shortcomings;

Performance problems, angular is to use dirty check to achieve data update, when the page more and more data, dirty check the efficiency of the corresponding decline, the page will become more and more obvious

Lag behind current web development concepts, such as component development

Not friendly to mobile phone-side support

Late September 14, ANGUALR2 official debut, September 16 ANGULAR2 official release

ANGULAR2 new Features:

1, remove controller+ $scope design, switch to component-type development

2. Better performance (faster rendering, higher change detection efficiency)

3. Priority for mobile application design (Angular mobile Toolkit)

4, more fit for the future standard (ES6/7 webcomponent)

Seamless upgrade solution for smooth transition of ANGULAJS1 to ANGULAR2

ANGULAR2 Core Concepts:

Components (core), modules, dependency injection, directives, services, data binding, templates, metadata

The component has a complete lifecycle hook:

Component examples:

Data binding:

Interpolation (two curly braces)

One-way binding--property binding (passing the data of the component class to the build template <input [value]= "MyData"/> Data flow to a top-down parent component to a subcomponent @Output), event binding (the data generated by the template is passed to the component class in the form of a function call <input [keyup]= "Handle ($event)"/> Data flow to the bottom-up subcomponent to the parent component @Input)

Bidirectional binding--<input [(Ngmodel)]= "MyData"/>

Instructions:

attribute directives, structure directives and Angularjs1 are not exactly the same concept

Example:

Service:

A service is a logical unit that implements a purpose, such as a log service

Dependency Injection:

A mechanism by which components introduce external constructs, such as services

Module:

Typescript Description: Address http://www.typescriptlang.org/

ANGULAR2 's official recommended development language is the programming language developed by Microsoft

1. JavaScript hyper-Set, compatible with JavaScript

2. Pre-compile to generate JavaScript before running

3, add type judgment, compile-time type check

4. file extension. ts

ANGULARJS1 can refer to:

1, HTTP://WWW.TUICOOL.COM/ARTICLES/YMMQ2MF

2, http://blog.csdn.net/u013063153/article/details/52458362

ANGULAR2 & ANGULARJS1

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.