1. Introduction to AngularJS
History of AngularJS: AngularJS was developed by Google and released in 2010 as a JavaScript
framework for building dynamic web applications.
Characteristics of AngularJS: AngularJS is a client-side framework that extends HTML with
additional attributes and directives for building rich, single-page applications (SPAs).
MVC Architecture: AngularJS follows the Model-View-Controller (MVC) architecture, separating
concerns for better maintainability.
2. Directives in AngularJS
ng-model: The ng-model directive binds input elements like text fields and checkboxes to application
data.
ng-repeat: This directive repeats an element for each item in a collection, creating lists or tables.
ng-if and ng-show/ng-hide: These directives are used for conditional rendering of elements based
on expressions.
3. Data Binding in AngularJS
Two-Way Data Binding: AngularJS provides two-way data binding, allowing changes in the view to
automatically update the model and vice versa.
Expression Binding: AngularJS expressions are used to bind data directly in the HTML view using
curly braces {{ }}.
Scope: AngularJS uses $scope as a glue between the controller and view, holding the data that is
rendered in the UI.
4. Controllers in AngularJS
Controller Role: Controllers in AngularJS are JavaScript functions that contain the business logic
and manipulate the $scope object.
Controller Syntax: Controllers are defined using the ng-controller directive, and functions are
attached to the $scope object.