ANGULARJS Study Notes

Source: Internet
Author: User

1.AngularJS Four core features

1) MVC = Model (data) vew (view) control (behavior) The ultimate goal is modularity and reuse

2) modularity and Dependency injection, everything starts with module modules, Controller,service, Directive,config,filter, etc. under module

3) bidirectional binding of data

4) Instruction

2.angularjs dedicated segment point debugging Tool Angular Batarang, Bower relies on administrative tools, downloads the required plugins. Protractor simulating a person's operation on a keyboard mouse

3.controller Controller: Only one controller is set on a single page. The DOM element is not manipulated in the controller. In general, controllers do not call each other. If you must interact, it is done through events.

3.service Service: Refers to the part of the code that is common to each controller. Each controller is called service, not inherited.

The Angularjs internally encapsulates 24 built-in services.

such as $http, $filter (also built in 9 kinds of filter i)

4. Perform the operation of the DOM element in the directive instruction, or write it in the compile function or compile function of the instruction.

The difference between the compile function and the compile function:

With compile, you must write a return function: Return function () {}, which is actually the link function. The link function does not need to write this step.

Most often use link, rarely with compile, if you write these two at the same time, do not execute the code in link.

5. The inside of the directive is the controller that can be set, which is not a director. But to expose (provide) some method, call to other instructions. The link function is used to handle things inside the instruction.

and the interaction between instructions and instructions has to be called with require.

6. $injector encapsulates the Invoke (call), annotate (get function parameters) and other methods;

ANGULARJS Study Notes

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.