This post describes the six most widely used AngularJS concepts for web development. These are some of the main topics where the developers have either raised or answered the most no of queries about them on various communities and forums.
Out of all the six, the directive is the one that locked the first spot by superseding every other topic. Since it is primarily myself and some of my colleagues who collected and compiled this data, so we may have missed some. Hence, you are welcome to add any further topics with letting us know the reason for it being on the top.
Following is the list of top six topics that Angular developers favor the most:
a) Directives
b) Scope object
c) Ng-repeat
d) Angular UI & Bootstrapping
e) Routing
f) Service
Let's now review why are the above areas more popular than the others.
a) Directive
It is the cornerstone and most discussed feature of AngularJS framework. Here are some key reasons:
i) Highly Reusable
A directive gets created once as a part of the module. After that, using it in the module gets it injected as a dependency while defining the new module and mention the directives wherever required on the web page.
ii) Readability
One can give any intuitive names to directives to increase the code readability and usability of the code.
iii) DRY approach
Together with the templates, directives become a more lethal feature. It eliminates the code redundancy by re-using the same HTML code at every required place instead of copying it everywhere.
b) Scope Object
The scope used to be the second most favorite topic for the programmers and still it is for those maintaining application using the first version of Angular. The concept of scope is critical for the dependency injection. It is both powerful and complicated as well.
c) Ng-repeat
The ng-repeat feature adds more teeth to AngularJS as it is one of the crucial features that took away the need of server-side logic required to re-execute the HTML code in continuous iterations. With ng-repeat, it becomes much easier to repeat the HTML code as needed.
d) Angular UI & Bootstrapping
The one area where Angular lacks is its disability to produce a single solution for creating some great UI powered with the eventing feature. One still requires to use some UI frameworks such as bootstrap, Kendo-UI for creating a modern and stylish UI. This gap can get filled up by using the Angular UI and bootstrap.
AngularUI bundles some of the very engaging feature set for enhanced routing, grid util, angular editor plugins, and bootstrap module, etc.
e) Routing
Routing in Angular is responsible for creating a single page application. Since Angular makes it very trivial to create a single-page application using routing, hence it automatically becomes a notable feature. One needs to be well-versed with this concept to make the most its application. The web developers love to use it.
f) Service
When an angular application gets bigger, it gets even more complicated further. In such situations, it is best to externalize some of the business logic from the controllers into reusable objects. The concepts of services provide a high-level of modularity as well as reusability in Angular components. These services are of a plug-and-play kind and can be embedded in other modules by exercising the dependency injection (DI) feature. Angular has following elements supporting the DI:
- Controllers
- Services
One of the prominent techniques for creating services is by using the factory recipe method also known as the service recipe.
You can read and learn more angular features and concepts from this post on angularjs interview questions.
Top comments (0)