Angularjs introduced a lot of new concepts, it is necessary to understand the general concepts before learning
Template |
Template--html Templates |
Directive |
Directives--Custom attributes or HTML elements to extend HTML |
Model |
Model-the data that the user sees and interacts with in the view |
Scope |
The scope--model stored environment, through which the controller, directives and expressions can access the model |
Expressions |
Expressions--accessing variables and functions from scope |
Compilier |
Compiler--parse templates and instantiate directives and expressions |
Filter |
Filter--Filter or format the value of an expression output |
View |
View--The DOM that the user sees |
Data-binding |
Data binding--synchronizing data between views and models |
Controller |
Controller-The business logic behind the view |
Dependency-injection |
Dependency Injection--not very good explanation. 囧 |
Injector |
Injector-a container that relies on injection |
Module |
Contains containers for various parts of the application, including controllers, services, filters, directives. |
Services |
Services-A separate view of business logic that can be reused |
Template and View
Take a look at the code first
1 <DivNg-app Ng-init= "qty=1;cost=2">2 <b>Invoice:</b>3 <Div>4Quantity:<inputtype= "Number"min= "0"Ng-model= "Qty">5 </Div>6 <Div>7Costs:<inputtype= "Number"min= "0"Ng-model= "Cost">8 </Div>9 <Div>Ten <b>Total:</b>{{Qty * cost | currency}} One </Div> A </Div>
This is an ordinary HTML, which we call the Template in Angularjs.
When Angularjs is started, the compiler Compilier starts parsing the compiled template, which is the view
Angularjs Learning 01--Concept