Fireship · @fireship
Firestore with AngularFire5 Quick Start Tutorial
Uploaded October 4, 2017 · Length 10:00
Summary
This video teaches how to use Firestore with AngularFire5 in an Angular application, covering benefits, query language, and observable data.
- angularfire5
- firestore
- angular
- firebase
- nosql database
- query language
- observable data
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
just yesterday Firebase launched an
- 0:01
exciting new product called fir store
- 0:04
simultaneously angular fire was updated
- 0:06
to version 5 which supports fir store
- 0:08
and brings in a whole bunch of other
- 0:09
important changes in this episode I'm
- 0:11
going to show you how to use the fir
- 0:12
store module in angular as well as talk
- 0:14
about the benefits that firestore brings
- 0:16
to app developers then over the next
- 0:18
couple weeks I'm going to release a
- 0:19
whole bunch of new videos showing you
- 0:21
how to build real world features with
- 0:22
firestore so make sure to subscribe if
- 0:25
you're just finding me for the first
- 0:26
time before we get to the code let's
- 0:28
first distinguish what firestore is and
- 0:30
how it relates to the existing real-time
- 0:32
database that's already in Firebase fir
- 0:34
store is a nosql database that solves
- 0:36
many of the limitations that developers
- 0:38
have found with the realtime database in
- 0:40
other words it does pretty much
- 0:41
everything the real-time database does
- 0:43
with a few extra features on top the
- 0:45
First Advantage is being able to query
- 0:47
nested data in a memory friendly way in
- 0:49
the real-time database you would have to
- 0:51
load all of an objects nested data which
- 0:53
makes it hard to organize data properly
- 0:55
with fir store you can create a tree of
- 0:57
documents that point to other documents
- 0:59
or other collections of documents this
- 1:01
makes it easy to model data
- 1:03
relationships and make queries that are
- 1:05
shallow and memory friendly another
- 1:07
major benefit is its query language
- 1:09
which we'll see later in the code but it
- 1:11
has a wear statement that you can use to
- 1:13
filter data by equality for example name
- 1:16
equals the string of Jeff or with range
- 1:18
operators where the score is greater
- 1:20
than 23 and it allows you to build
- 1:22
indices where you can efficiently make
- 1:24
these queries fir store will build an
- 1:25
index for each individual property then
- 1:28
you have the option to create your own
- 1:29
based on multiple properties now that we
- 1:31
know that let's actually build something
- 1:33
with fir store I built a new feature
- 1:35
into our fire starter demo app that uses
- 1:37
fir store on the back end which you can
- 1:38
check out in the link in the description
- 1:40
if you're brand new to angular fire you
- 1:42
can follow the install instructions on
- 1:44
the GitHub page but I'm going to assume
- 1:46
you have an existing angular application
- 1:47
and show you how to upgrade it to
- 1:49
angular fire 5 so first you'll have to
- 1:51
uninstall angular Fire 2 with npm then
- 1:54
reinstall it making sure that the
- 1:56
version is 5.0 or greater then I should
- 1:58
warn you that there are many Breaking
- 1:59
Chang es in version 5 so make sure to


