Fireship · @fireship

Firestore with AngularFire5 Quick Start Tutorial

Uploaded October 4, 2017 · Length 10:00

Firestore with AngularFire5 Quick Start Tutorial

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.

  1. 0:00

    just yesterday Firebase launched an

  2. 0:01

    exciting new product called fir store

  3. 0:04

    simultaneously angular fire was updated

  4. 0:06

    to version 5 which supports fir store

  5. 0:08

    and brings in a whole bunch of other

  6. 0:09

    important changes in this episode I'm

  7. 0:11

    going to show you how to use the fir

  8. 0:12

    store module in angular as well as talk

  9. 0:14

    about the benefits that firestore brings

  10. 0:16

    to app developers then over the next

  11. 0:18

    couple weeks I'm going to release a

  12. 0:19

    whole bunch of new videos showing you

  13. 0:21

    how to build real world features with

  14. 0:22

    firestore so make sure to subscribe if

  15. 0:25

    you're just finding me for the first

  16. 0:26

    time before we get to the code let's

  17. 0:28

    first distinguish what firestore is and

  18. 0:30

    how it relates to the existing real-time

  19. 0:32

    database that's already in Firebase fir

  20. 0:34

    store is a nosql database that solves

  21. 0:36

    many of the limitations that developers

  22. 0:38

    have found with the realtime database in

  23. 0:40

    other words it does pretty much

  24. 0:41

    everything the real-time database does

  25. 0:43

    with a few extra features on top the

  26. 0:45

    First Advantage is being able to query

  27. 0:47

    nested data in a memory friendly way in

  28. 0:49

    the real-time database you would have to

  29. 0:51

    load all of an objects nested data which

  30. 0:53

    makes it hard to organize data properly

  31. 0:55

    with fir store you can create a tree of

  32. 0:57

    documents that point to other documents

  33. 0:59

    or other collections of documents this

  34. 1:01

    makes it easy to model data

  35. 1:03

    relationships and make queries that are

  36. 1:05

    shallow and memory friendly another

  37. 1:07

    major benefit is its query language

  38. 1:09

    which we'll see later in the code but it

  39. 1:11

    has a wear statement that you can use to

  40. 1:13

    filter data by equality for example name

  41. 1:16

    equals the string of Jeff or with range

  42. 1:18

    operators where the score is greater

  43. 1:20

    than 23 and it allows you to build

  44. 1:22

    indices where you can efficiently make

  45. 1:24

    these queries fir store will build an

  46. 1:25

    index for each individual property then

  47. 1:28

    you have the option to create your own

  48. 1:29

    based on multiple properties now that we

  49. 1:31

    know that let's actually build something

  50. 1:33

    with fir store I built a new feature

  51. 1:35

    into our fire starter demo app that uses

  52. 1:37

    fir store on the back end which you can

  53. 1:38

    check out in the link in the description

  54. 1:40

    if you're brand new to angular fire you

  55. 1:42

    can follow the install instructions on

  56. 1:44

    the GitHub page but I'm going to assume

  57. 1:46

    you have an existing angular application

  58. 1:47

    and show you how to upgrade it to

  59. 1:49

    angular fire 5 so first you'll have to

  60. 1:51

    uninstall angular Fire 2 with npm then

  61. 1:54

    reinstall it making sure that the

  62. 1:56

    version is 5.0 or greater then I should

  63. 1:58

    warn you that there are many Breaking

  64. 1:59

    Chang es in version 5 so make sure to