What components can be declared in a angular module?

Source: Internet
Author: User

What components can be declared in a angular module?

(1) Controller controllers

(2) Directive directive

(3) function Angular.module ()

(4) Service ng/service/$http

(5) Filter Filters

(6) provider provider/Supplier

(7) Object objects

(8) Type

(9) Factory factory

Services provided by Angularjs:

(1) ng/service/$http: An AJAX request to initiate an asynchronous application to the server

Usage:

$http ({method: ' get/post/... ', url: '}). Success (FN). Error (FN);

$http. Get (' URL '). Success (FN);

$http. Post (' URL ', data). Success (FN);

Note: The $http object can be used in the controller to get an AJAX request response from the server, and the object must be declared in the Controller declaration function!

(2) ng/service/$interval: Used to implement a periodic timer within the controller

Usage:

$interval (FN, time);

Two four characteristics of Angularjs-two-way data binding

Angular the center of all operations: Model data--GET, Render, modify, delete

Dom/jquery the center of all operations: DOM elements

(1) Direction 1: Bind the Model data (not the simple output) to the view, and at any time thereafter, as long as the model data changes, the output in view will change synchronously!

Description: Most of the directives provided by angular have data binding capabilities by default.

(2) Direction 2: The data in the View (Form input field) is bound to the model, thereafter, whenever the view data changes, the data in the model is changed immediately!

Description: Bindings in this direction can only be implemented using the ngmodel directive!

Ewei (Shenzhen) technology Co., Ltd.

Multi-dimensional Your world

: Evisyojoy

Weibo:Http://weibo.com/EVisYOJOY

Official website:http://www.evister.com/

Contact & submission: [Email protected]

What components can be declared in a angular module?

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.