AngularJS (First, why we choose AngularJS)

Source: Internet
Author: User

In the course of learning and using ANGULARJS, one such question has been haunting us: Why do we choose Angularjs

First, let's take a look at the official note:

Angularjs is designed to overcome the lack of HTML in building applications. HTML is a good declarative language for static text presentation design, but it seems weak to build a Web application. So I did some work (you can also think of it as a gimmick) to get the browser to do what I want.

Angularjs uses a different approach, and it tries to make up for the drawbacks of HTML itself in building applications. Angularjs allows the browser to recognize the new syntax by using the structure we call Identifiers (directives). For example:

Use double curly braces {{}} syntax for data binding;

Use the DOM control structure to iterate or hide dom fragments;

Support validation of forms and forms;

The ability to associate logical code with related DOM elements;

The ability to compose HTML into reusable components.

ANGULARJS simplifies application development by presenting a higher level of abstraction for developers. As with other abstractions, this also loses some of the flexibility. In other words, not all applications are suitable for use with ANGULARJS. Angularjs is primarily concerned with building crud applications. Fortunately, at least 90% of Web applications are CRUD applications. But to understand what is appropriate to build with ANGULARJS, you need to understand what does not fit angularjs build.


By official means, Angularjs is actually a supplement to HTML, it does something that makes HTML development webapp easier and faster.

     below we use HelloWorld to see how simple and quick:

The general control data is displayed to the interface, we need to invoke DOM operations, now let's look at how ANGULARJS operates:

Angularjs through data two-way binding, so that the data model bound in input can be automatically displayed in the <p> tag, this is the first advantage of ANGULARJS, data $scope two- way Binding ,

then the directive (directives) , what it does is declare a custom tag to customize the DOM, and then control the data Change (M) and the display of the interface (V) through the controller (controllers) .


The second is to bring the concept of MVC from the background into the front, so that the front-end large quantities of code can be clearly written to see. In the next article we'll talk about how to build a front-end code framework with ANGULARJS


Angularjs Chinese website



This article is from the "Snow July" blog, please be sure to keep this source http://xuepiaoqiyue.blog.51cto.com/4391594/1636202

AngularJS (First, why we choose AngularJS)

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.