Frontend JavaScript Sviluppo Web

Complete Tutorial: Angular and Local Storage CRUD for Product Management Systems

Full CRUD with Angular and Local Storage: product management without a backend, reactive forms, routing and dynamic table.

Course description

Angular and Local Storage: A Complete CRUD Without a Backend

Want to learn how to build a complete Angular application but don’t have a backend yet? In this course we use the browser’s Local Storage as a database to build a product management system with all CRUD operations: insert, display, edit, and delete. A practical, compact, and highly useful project for solidifying Angular logic.

What You'll Learn

  • Angular project architecture and module structure
  • Creating a model with ng generate class
  • Service for managing Local Storage: insert, getAll, delete, and update
  • Insert form with Bootstrap and routing between pages
  • Dynamic table with ngFor to display products
  • Post-insert redirect with the Angular Router
  • Deleting and editing objects in Local Storage

Why Use Local Storage to Learn Angular

Local Storage lets you build complete CRUD logic without setting up any server. All the complexity of data management falls on Angular services, which become the heart of the application. It is an excellent approach for those who want to understand how services work before moving on to HTTP calls toward a real REST API.

Who This Course Is For

Perfect for those who know the basics of Angular — components, routing, templates — and want to build their first complete practical project. If you have followed an introductory Angular course and don’t know where to start to build something concrete, this tutorial is made for you.

Lessons list

Let's explore the architecture of the Angular project we'll build: how we structure modules, components, and services to use the browser's Local Storage as a data persistence system without any backend.

Guarda lezione

Let's create the TypeScript product model using the ng generate class command: we'll define the properties and data types we'll save and read from Local Storage throughout the course.

Guarda lezione

I'll show you how to create an Angular Service with the @Injectable decorator to manage Local Storage: we'll initialize the storage key, implement the insert method to add a product, and getAll to retrieve them all.

Guarda lezione

Let's go deeper into the insert and getAll methods of the Angular Service: we'll see how to correctly serialize TypeScript objects to JSON for Local Storage and deserialize them on read with JSON.parse.

Guarda lezione

Let's build the product insert form with Bootstrap inside a dedicated Angular component and configure routes in AppRoutingModule to navigate between the form page and the product list.

Guarda lezione

Let's complete the Angular insert form by adding required field validation and the Service call: on submit, the product data is serialized and saved to Local Storage via the insert method.

Guarda lezione

Let's see how to display the product list in Angular with a dynamic Bootstrap table, using the ngFor directive to iterate the array returned by the Service's getAll and render each row automatically.

Guarda lezione

Let's add automatic redirect after saving a product: I'll inject the Angular Router into the component and use navigate() to send the user to the list page immediately after insertion.

Guarda lezione

I'll show you how to implement product deletion from Local Storage in Angular: on button click in the table row, I'll call the Service's delete method to remove the item and update the list.

Guarda lezione

Let's implement the edit feature for an existing product: I'll read the ID from the route with ActivatedRoute, load the data into the form, and prepare the update method in the Service to overwrite the record in Local Storage.

Guarda lezione

Let's wrap up the Angular + Local Storage CRUD by finalizing product editing: the Service updates the item in the array, saves everything as JSON, and the Router automatically redirects to the updated product list.

Guarda lezione
Giovanni Pace

Giovanni Pace

Ingegnere Informatico · Pratola Peligna

  • 107 Courses
About the teacher

Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.

This course includes

  • Lessons 11
  • Duration 1h 30m
  • Difficulty intermedio
  • Language it
  • Certificate No

Recently viewed