Before we learn any technology we should first understand the primary purpose of inventing it. Angular is not very old and not very new to developers as well. It comes with rich set of API for manipulating of DOM but we still first need to understand why was it invented, isn’t it?
Data binding directly to HTML controls is the primary objective behind finding the angular. We hardly work with any application without the database. Offcourse Similar operations can be achieved by jQuery,etc but we are going towards easier world for developers thus Angular !
Angular uses a structured MVC way to bind data to controls and it also provides two way data binding approach. Means your model bound to any text box on HTML changes immediately as user changes the data and vice versa. Nevertheless to say without any Postbacks.
Angular is a framework thus it actually can not be compared to any libraries. One can design full fledged Single Page application with Angular. Following are the things for which we can use the Angular framework:
- Data Binding
- Unit Testing
- Dependency Injection
- Reusable component(Directives, Custom Directives)
- Deep linking
- Form Validation
- Animation support
Now you know the primary purpose of Angular. Lets see some code, especially to two way binding example:
<!DOCTYPE html> <html data-ng-app> <head><title>Example</title> https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js </head> <body>Name</body> </html>
AngularJS developed for data driven applications with data binding is the primary objective.
In next tutorial we will start with basics of Angular.
Next chapter is Here