🔗 https://alobuuls.github.io/angular-local-storage-basics/
Note
An Angular 16 application that demonstrates the fundamentals of Local Storage for persisting data in the browser.
The project shows how to store and retrieve primitive values and JSON objects using the Local Storage API, as well as the use of JSON.stringify() and JSON.parse() for data serialization and deserialization.
Before running the project, make sure you have installed:
- 📦 Node.js:
v16.14.x – v18.x(recommended: v18 LTS) - 📦 npm:
v8+ 🅰️ Angular CLI:v16.x
nvm install 18
nvm use 18Run the following commands in your terminal:
node -v
npm -v
ng versiongit clone git@github.com:alobuuls/angular-local-storage-basics.git
cd angular-local-storage-basicsnpm installStart the development server:
ng serveThen open:
http://localhost:4200
The application follows a simple Angular architecture focused on demonstrating browser-side data persistence.
Responsible for:
- Storing data in Local Storage
- Retrieving stored values
- Persisting strings
- Persisting JSON objects
- Displaying results through the browser console
- 💾 Store data in Local Storage
- 📤 Retrieve stored data
- 🧾 Use of
JSON.stringify() - 🔄 Use of
JSON.parse() - 📦 Object persistence
- ⚡ Browser-side storage
- 🖥️ Console-based output
| Technology | Purpose |
|---|---|
| Angular 16 | Front-End Framework |
| TypeScript | Application Logic |
| Local Storage API | Browser Persistence |
| JSON API | Data Serialization |
angular-local-storage-basics/
├── src/
│
├── app/
│ ├── app.component.ts
│ ├── app.component.html
│ ├── app.component.css
│ └── app.module.ts
│
├── main.ts
├── styles.css
├── index.html
│
├── angular.json
├── package.json
├── tsconfig.json
└── README.md
- Browser data persistence
- Local Storage API
- JSON serialization
- JSON deserialization
- Object storage and retrieval
- Client-side state persistence
- Angular component lifecycle basics
Practice and strengthen Angular fundamentals through the implementation of browser-based persistence using Local Storage.
Key concepts covered:
- Local Storage API
- Data Persistence
- JSON.stringify()
- JSON.parse()
- Angular Components
- TypeScript Fundamentals
- Browser Storage Mechanisms
This project is intended for educational and portfolio purposes.
Created by Alondra Francisco.