Two four characteristics of Angularjs: two-way data binding
(1) Direction one: The model data is bound to the view-then whenever the model has changed, the rendering in view will change immediately! Implementation method:
{{}}, Ngbind, Ngrepeat, Ngif, Ngsrc, Ngstyle ... All implement the binding of direction 1.
(2) Direction Two: Modify the View (Form control) to bind to the model-at any time thereafter, whenever the data in the view is modified, the data in the model is automatically modified. Implementation method: only Ngmodel instructions .
Tip: You can use the $scope. $watch (' model variable name ', FN) to monitor a change in the value of a model variable; a single-line text input field, a multiline text input field, a drop-down box, a radio button control, by default, binds one of its Value property values to a model variable; check box will put a true The/false value is bound to a model variable.
Services provided in NG module (service)
(1) $rootScope: For sharing data between different controllers
(2) $interval: Provide periodic timer service
(3) $timeout: Disposable Timer service available
(4) $http: Initiating an asynchronous AJAX request service
4.AngularJS four characteristics of two: two-way data binding