Angular and jqueryCommon Ground
different points:
What is Angularjs
A front-end framework that provides a way to greatly reduce DOM operations by introducing some of the ideas that are traditionally used in background development in front-end pages, enhancing the structure and maintainability of code
A fully functional front-end framework that provides a convenient way to develop Web applications by enhancing HTML
Its core feature is that there is virtually no DOM operation, so that the developer's energy and time are all focused on the business
Dependency Injection
You don't want to come to me, I'll find you.
The principle framework obtains the passed parameters in the process of invoking the method, and then the framework handles the method ToString after it is processed by the regular expression and then instantiates it sequentially.
Module
Controller
-
-
fuction written outside (cannot be compressed outside) function Otherctrl (otherscope) { Otherscope.name= ' 123 '; } otherctrl. Scope '];//here add $inject App.controller (' Myctrl ', Otherctrl)
4 using the Dependency injection app.controller (' Myctrl ', function?) inside the controller. Scope, $injector) {
$injector. Invoke (function ($log) { $log. info (123); })
})
5 Early use (angular-1.2.29 version) function Mycontroller ($scope) {
$scope. name= "angular early use";
}
6 Object-oriented method usage
Angular Service
instruction
Ng-bind
Ng-bind-html
Ng-repeat
Ng-class
Ng-if
Ng-hide
Ng-show
Ng-switch
Ng-src
Ng-href
Ng-focus
Ng-blur
Ng-dblclick
MVVM Design Pattern
-
what is MVVM design mode
-
model"
-
view
-
ViewModel (view model)
-
consists of the above three parts where ViewModel is the function of the bridge to link the model and view together
-
MVVM pattern is the abbreviation for the Model-view-viewmode (model-view-view model) pattern, It first appeared in Microsoft's WPF and Silverlight frameworks, using the ViewModel (view model) to Bond view and model, while further separating the view from the model. Facilitates separation of artwork and programmer functions.
MVVM Nature
Characteristics of Angular
Angular Module/Service/MVVM