- Dependency Injection &
- Two way data binding
AngularJS directives are HTML attributes with an ng prefix.
ng-app directive is starting point which defines an AngularJS application or it is like an "owner" of application .
The ng-init directive initializes AngularJS application variables.
ng-model directive binds the value of the input field.
ng-bind directive binds the content.
AngularJS modules define AngularJS applications.
AngularJS controllers control AngularJS applications.
ng-controller directive defines the controller.
Add this libraray in script tag:
Here you will learn everything about
directives, expressions, filters, modules,controllers,Events, DOM, Forms, Input, Validation, Http, and more.
# What is Dependency Injection in Angular?
It is a coding pattern in which a class receives its dependency from an external source rather than creating them itself.
# What is Two-way data binding?
Two-way data binding means any data-related changes affecting the model are immediately propagated to the matching view and that any changes made in the view are immediately reflected in the underlying model.