Generating Services
In this lesson, we'll learn what services are and how to create them.
We'll cover the following...
Our form is ready. It’s sending the search query to the App component, where we’ll perform the request for the data. There are two approaches we can take for making a request. The first is to request the data in the component. The second is to request the data in a service.
What are services?
Services are objects with methods and properties for fetching data. They’re responsible for creating, updating, and fetching data. We don’t have to use services. They’re a completely optional feature of Angular.
If we want to, we can ...