AngularJS is well-suited for creating Single Page Application, but we can also use for multi paged dynamic web application.
AngularJS extends HTML Attributes with new attributes called Directives and Data binding to HTML with Expressions.Directives in AngularJS:
The ng-app directive initializes an AngularJS application. The ng-init directive initializes application data. The ng-model directive binds the value of HTML controls (input,select,textarea) to application data.Advantages of AngularJS:
Data binding in Angularjs means, it effects in model and view in parallel i.e., the changes happened in the model simultaneous it updating to the view. The changes that reflects in the model and view with in the fraction of seconds.MVC(Model-View-Controller):
Model:The Model is reponsible for managing the application data. It reponds to the request from the view and for updating itself getting the instructions from the controller.
View: View is a visual representation.The presentation of data in a particular format, triggered by controller decision to present the data. The srcipt based template systems i.e., JSP, ASP, PHP. These are very easy to integrate with AJAX technology.
Controller: Controller is the link/communication between the user and the system. It controls the interactions between the Model and the View.Testing:
Unit Testing:Unit testing, that separates the code into an unit(Breaking down the logic of the application into smaller chunks) called module and test each module separately.
Dependency Injection is a software design pattern that allows the removal of hard-coded dependencies and makes it possible to change them. All those things makes our code maintainable because we have less code,Extensible and Testable.