Introduce a little bit of Angularjs basics to get started!
1, ViewModel: is a to provide special data and methods to maintain the view of the object, ViewModel is $scope object, only exist in Angularjs, $scope is a simple JS object.
2, Model: is the application of simple data, is generally simple JS object.
3, CONTROLLER: Responsible for initializing the state and parameterized $scope method to control the behavior. However, $scope does not save the state or interact with the remote service.
4, View:view is ANGULARJS parsing after rendering and binding generated HTML;
PS: $scope has a reference to the data, the controller defines the behavior, the view handles the layout and the interaction.
5. The Ng-app attribute indicates that the contents of this DOM will enable the ANGULARJS application and specify the scope of NG to be within the DOM element where this property resides.
6. ng-model= "AA" means two-way data binding to this AA on the page.
7, {{AA}}: This is a template expression that shows the data of AA on this instruction template.
8. $scope is an object that connects the view with both a DOM element to the controller.
9, module: By calling Angularjs module method to declare a block, the module name and Ng-app value corresponding, so that you can let Angularjs run up.
10, Ng-controller: To explicitly create a $scope object, we will put a controller object to the DOM element, using the Ng-controller Directive properties, The Ng-controller directive creates a new $scope object for the DOM element in which it is located, and includes the $scope object in the Outer $scope object;
PS: All scope objects Follow the stereotype inheritance, which means that they all have access to any properties and methods of the parent scope, and when we call the properties and methods of the $scope object, we want to find the corresponding property and method in the local $scope object, if not found, look up, Until the root scope object (Rootscope) has been found.
Angularjs Basic Understanding