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?