Concept and Advantages of Angularjs
AngularJS concepts include;
- Modules- Many modules form an app. There can be one main module and many sub modules per app. Setter: angular.module (‘app’, [ ])
- Controllers- Mostly the main component of a module which acts as glue for data and templates. Also known as View-Model
- Scope- Controllers, services, directives and most of the components have scope. Defined as $scope.
- Data Binding (two way and one way)- Binding data using directives and controllers.
- Services/Factories-Good apps use services. Can communicate between controllers. Business logic goes here.
- Directives-They are needed to manipulate html elements. AngularJS has many built-in directives
- Routing- It links pages. Routing is necessary for SPAs
- Templates (HTML)- They make up an app. They get compiled when loading.
Advantages of Angularjs are:
Two way data binding –
AngularJS was built with Model-View-Controller architecture. And the framework synchronized the Model and the View. As the data in the changes, the View does too.
Dependencies define how different pieces of code interact with each other and how the changes in one component impact the other ones. Usually, dependencies are directly defined in components themselves. So that every change in dependency requires changing components as well. With AngularJS , you could use injectors that defined dependencies as external elements decoupling components from their dependencies.
Developers can reuse them across different parts of an application. This is particularly useful in enterprise-scope applications where different systems converge but may have many similar elements.
Developers can read code better and eventually reach their plateau of productivity faster.
Designers can now re-utilize the codes or the parts of the codes composed before in various applications in this manner making Angular JS advancement an extremely extraordinary structure.