The things that angular

Source: Internet
Author: User

    • What is Angular.js?

AngularJS is a JavaScript framework. It can be added to the HTML page by <script> tags.

AngularJS extends HTML through instructions, and binds data to HTML through an expression.

Angularjs is primarily used to build single-page Web applications. It makes building interactive, modern web applications easier by increasing the level of abstraction between developers and common Web application development tasks.

Angularjs makes it easy to develop Web applications and reduces the difficulty of building complex applications. It provides a range of advanced features that developers often use in modern web applications, such as:

1. Decoupling application logic, data model and view;

2.Ajax Service;

3. Dependency Injection;

4. Browsing history (make bookmarks and forward, back buttons work as you would in a normal web app);

5. Testing and so on.

Angularjs has many features, the core of which is MVVM, modularity, automated bidirectional data binding, semantic tagging, dependency injection

    • What are $scope, what do you do with it?
    1. $scope is a scope and can be understood as an object.
    2. The $scope provides tools and methods such as $watch () and $apply (), and so on.
    3. $scope is also an execution environment (scope).
    4. The child $scope can inherit the properties and methods of the parent $scope.
    5. Each angular application has only one with $scope ($rootscope, located in Ng-app).
    • Data binding
    1. Interpolation expression {{}} Show data
    2. Ng-bind Display data (basically the same as the previous function)
    3. Ng-modle Bidirectional binding Data
    • About the characteristics of Angularjs

1. Bidirectional binding of data: This may be its most exciting feature, the view layer of data and the model layer of data is two-way binding, one of the changes, the other side will change, this does not need you to write any code! (Think about how to do it in jquery mode.)

2. Code modularity, each module's code independently has its own scope, Model,controller and so on.

3. Powerful directive can encapsulate many functions into HTML tags, attributes or annotations, which greatly beautify the structure of HTML and enhance the readability;

4. Dependency injection, the design pattern of this back-end language to the front-end code, which means that the front-end code can improve reusability and flexibility, the future pattern may be a large number of operations on the client, the server only provide data sources and other clients can not complete the operation;

5. Test-driven development, ANGULARJS from the outset, the use of angular developed applications can be easily carried out unit testing and end-to-end testing, which solves the traditional JS code difficult to test and maintenance of defects

The things that angular

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.