Modern web applications are usually data-driven. More often than not, we need to CRUD (create, read, update, and delete) data from various resources, or consume APIs. Angular makes it easy for us to work with data from external sources for use in our components.
Angular provides a simple HTTP API that grants our applications HTTP functionality. It is built on the native XMLHttpRequest interface exposed by modern browsers, and with it, we can carry out any of these HTTP operations:
- Get: Requests data from a resource
- Post: Submits data to a resource
- Put: Modifies data in a resource
- Delete: Deletes a specified resource
In this chapter, we will learn how to work with Angular to consume APIs and make our applications ...