Why we use NGX-Restangular
Restangular is an Angular service which makes GET/POST/PUT/DELETE requests simpler and easier. The configuration is easier and can be done in several ways with different initiation settings.
How NGX-Restangular can be helpful
Use rich features for complex tasks. Convenient when working on complex client-side tasks. Supports promises and observables, has clear structure and a long list of features.
- Sending requests is easyNgx-restangular makes it easier to make GET/POST/PUT/DELETE requests. It is easily configurable and allows sending requests in different ways using various initial settings.
- No need to write URLsWith Ngx-restangular it is not necessary to remember and write any URL like with httpClient where URL Template is required. You can just use the name of the resource you need to fetch and that’s it.
- Perform Requests Without Making New ObjectsWith Ngx-restangular new objects for requests are not required. Instead, you can utilize the object that is returned by Ngx-restangular.
- Custom HTTP methods supportProvides the opportunity to create your own methods to perform operations you need. All HTTP methods are supported.
- Nested RESTful resources supportNgx-restangular supports nested RESTful resources. No need to know the URL, the path or anything else to perform HTTP operation you need. Ngx-restangular handles that instead of you.
- Self-linking elements supportStop writing URLs manually. With Ngx-restangular you can use the item’s reverse link to query the server without constructing links yourself.