Several days ago Angular version 5 was released. Isn’t that a good luck that the same time ngx-restangular has reached 5 hundred stars on Github? It was quite a long journey since last year September that was accompanied by community support - great job, everyone! Let’s keep it high!
Handling all http requests in one place is an inherent part of any modern app. The choice of a tool for that is more a question of team skills and approach. At this, one couldn’t simply ignore the open-source products metrics when choosing a solution.
Actually, we ended up with the list from Github page called “Awesome Angular2+ Components” from “Utilities to consume APIs”. Here is the list of contenders:
The current state and version of a library
The first thing to look at is the state and status of a library. Is it still actual and supported?
|Very basic alpha state / -||No longer supported* / 3.6.0||Stable / -||Stable / -||Stable / -|
*The author has created new library rest-core with rest-ngx module. As you can see some of the libraries were discontinued or making only their first steps.
The commits count and when the latest commit was made.
Each day you make commits for the projects you are working at, the same should library developers do. So let’s look at the number of commits and how long ago the latest one was submitted. Just check the table below. It’s clear that only Аngular2-jsonapi, Ngx-restangular and Ngx-resource are actively developed and received so necessary bug fixes.
|35 / 1.5 year ago||263 / 11 days ago||177 / 14 days ago||24 / a year ago||199 /16 days ago|
Issues count (closed and open)
Shouldn’t we look closely at the number of closed and open issues? And here we go. Ngx-restangular has the lowest number of unresolved issues. Two libraries do not have any open bugs: Ngx-resource and Ng2-rest-api.
|2/171||115/0||59/212||1/0||99 / 33|
1the lastest issue was opened on 17.08.2017, was closed on 12.08.2016;
2the lastest issue was opened 2 days ago, was closed - 14 days ago;
3the lastest issue was opened 2 days ago, was closed - 14 days ago.
You can also look at the time when the latest issue was opened and closed. At the moment Angular2-jsonapi and Ngx-restangular have the same period for opening and closing the latest issue.
To develop a successful open-source project you need contributors and a community interested in it. In this aspect, you can notice parity among the projects. Only Angular2-jsonapi has a little bit more participants.
The number of stars you get at Github can tell you how popular your project is. We are sure you gave stars to the projects you enjoyed. So let’s look at this parameter.
In this case, the absolute champion is Ngx-restangular. Angular2-rest and Ng2-rest-api are ranked second and third respectively.
The biggest number of followers has Angular2-rest. Ngx-restangular is the second. And the third prize is divided between Ngx-resource and Angular2-jsonapi.
The number of forks
Supported Angular versions
All of the libraries support Angular2 framework. But Ngx-restangular has an advantage here as it also supports Angular4.
UPDATE: Ngx-restangular has Angular 5 support now.
So what library is the king of the Angular castle when you need to work with REST API? Our short analysis shows that Ngx-restangular library is always ranked at least as the second one. If we are talking about stars count, then in this discipline, Ngx-angular is the absolute leader. Angular2-rest and Ngx-resource libraries are also among the first three choices but have certain drawbacks that don’t allow to call them as the leaders. Angular2-rest development was stopped and new bugs are not fixed. In case of Ngx-resource, its developers decided to use it as a base for the new library rest-core with rest-ngx module. It means Ngx-resource does not receive new feature, but only bug fixes. Angular2-jsonapi scored third. It was also usually among the first three places but still remains unappreciated by web developers.
It wouldn’t be fair enough not to mention that Ngx-restangular offers more high level approach for work with REST API. One has steep learning curve before using it in a new project and requires to dedicate several hours to documentation.