Implementing core features
When we refer to core features in the application, we mean the following:
- Services that are going to be used globally in our application, such as a local cache or data access service
- Components that are going to be used only once, such as a header or footer component
In the following section, we will learn how to create a core service for handling local data.
Persisting data using local storage
In this application, we are going to use the Angular in-memory Web API that we have already seen in Chapter 6, Enrich Components with Asynchronous Data Services.
As we already know, it emulates the functionality of a backend API. Still, it keeps all data in memory, meaning that data will be gone when we refresh the browser, which is something that is not desirable. Thus, we are going to use the local storage of the browser as a means to persist it.
The local storage of the browser is an internal storage mechanism that can keep a limited...