Introduction to Application State
Get introduced to the concepts we will learn in this chapter.
We'll cover the following
Overview
Sometimes, we need our applications to maintain state between different pages. We can accomplish this by using dependency injection (DI). DI is used to access services that are configured in a central location.
In this chapter, we will create a shopping cart. As we add and delete items from the shopping cart, the application will maintain a list of the items in the shopping cart. The contents of the shopping cart will be retained when a user navigates to another page and then returns to the page with the shopping cart. Also, the shopping cart's total will be displayed on all of the pages.
In this chapter, we will cover the following topics:
Application state
Dependency injection
Creating the shopping cart project
Get hands-on with 1400+ tech skills courses.