DEV Community

Cover image for Angular 11 Firestore CRUD: add/get/update/delete documents with AngularFireStore
bezkoder
bezkoder

Posted on • Edited on

5 4

Angular 11 Firestore CRUD: add/get/update/delete documents with AngularFireStore

In this tutorial, I will show you how to build Angular 11 CRUD App with Firebase Cloud Firestore that uses AngularFireStore service to get/add/update/delete documents in a collection.

Angular 11 Firestore CRUD Overview

We’re gonna build an Angular 11 Firestore App using @angular/fire library in which:

  • Each Tutorial has id, title, description, published status.
  • We can create, retrieve, update, delete Tutorials.

Here are the screenshots:
– Create a new Tutorial:

angular-11-firestore-crud-app-create-tutorial

Cloud Firestore after the Create Operations:

angular-11-firestore-crud-app-cloud-firestore-data-view

– Retrieve all items:

angular-11-firestore-crud-app-retrieve-tutorial

– Change status to Published/Pending using Publish/UnPublish button:

angular-11-firestore-crud-app-update-status-tutorial

– Update the Tutorial details with Update button:

angular-11-firestore-crud-app-update-tutorial

– Delete the Tutorial using Delete button:

angular-11-firestore-crud-app-delete-document

Technology

  • Angular 11
  • firebase 8
  • @angular/fire 6
  • rxjs 6

Project Structure

angular-11-firestore-crud-project-structure

For more details, please visit:
https://bezkoder.com/angular-11-firestore-crud-angularfirestore/

Related Posts:

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (2)

Collapse
 
junhoyoon95 profile image
Junho Yoon

Another one, can I change user's email? To give you more context, I made an angular web with firebase signInWithEmailAndPassword and verify user by email. And I want to make ‘my page’ where user can change own email address. Thanks a lot!

Collapse
 
junhoyoon95 profile image
Junho Yoon

Hi there! It has been difficult to find advanced information about this particular topic. This article helps me a lot! Massive thanks. I'm using Angular11 as Front and Firebase as Database. Quick question. I can't wrap my head around how to read data from firestore on specific conditions like SELECT user_address FROM Users WHERE user_name =='junho yoon'. Do you happen to have any leads?

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay