concepts in AngularJS
The following table lists all the important concepts in AngularJS.
Concept |
Description |
Template |
HTML with additional markup |
Directives |
Extends the HTML with custom attributes and elements |
Model |
The data shown to the user in the view and with which the user interacts |
Scope |
A context where the model is stored so that controllers, directives and expressions can access it |
Expressions |
Executes JavaScript code inside brackets {{ }}. |
Compiler |
Parses the template and instantiates directives and expressions |
Filter |
Formats the value of an expression for display to the user |
View |
what the user sees (the DOM) |
Data Binding |
Sync data between the model and the view |
Controller |
Maintains the application data and business logic |
Module |
A container for different parts of an app including controllers, services, filters, directives which configure the Injector |
Service |
Reusable business logic, independent of views |
Dependency Injection |
Creates and wires objects and functions |
Injector |
Dependency injection container |
Attributes and braces such as ng-app, ng-model, and {{ }}. These built-in attributes in AngularJS are called directives.
The above example is plain HTML code with couple of AngularJS directives (attributes) such as ng-app, ng-model, and ng- bind.
ng-app, ng-model, ng-bind Examples:
Template
<html>
<head>
<title>First AngularJS Application</title>
Directives
</head>
<body ng-app >
<h1> Expressions in AngularJS Application</h1>
Enter Numbers to Multiply:
<input type="text" ng-model="Num1" /> x <input type="text" ng-model="Num2" />
= <span>{{Num1 * Num2}}</span>
</body>
</html>
For
More Explanation
&
Online Classes
More Explanation
&
Online Classes
Contact Us:
+919885348743
+919885348743