Fireship · @fireship

5 Cool New Features in AngularFire

Uploaded June 11, 2019 · Length 4:43

5 Cool New Features in AngularFire

Summary

angularfire version 5.2 adds new features like schematics, firebase performance integration, ID field, collection group query, and auth card module to simplify angular firebase projects.

  • angularfire version 5.2
  • angular firebase schematics
  • firebase performance integration
  • angularfire id field
  • collection group query angularfire
  • angularfire auth card module

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    over the last few weeks we've seen major

  2. 0:02

    new releases for both angular and

  3. 0:03

    firebase and that has resulted in

  4. 0:05

    angularfire version 5.2 and it contains

  5. 0:08

    a whole bunch of new features that you

  6. 0:09

    may have not been expecting in today's

  7. 0:11

    video we'll look at five brand new

  8. 0:12

    features in angular fire and how they

  9. 0:14

    can help simplify your angular firebase

  10. 0:16

    project if you're new here like and

  11. 0:17

    subscribe and you can find the full

  12. 0:19

    write-up on fire ship IO the first new

  13. 0:21

    feature you should be aware of are the

  14. 0:22

    new schematics that make it easy to add

  15. 0:24

    angular fire to an existing project and

  16. 0:26

    then deploy it to firebase hosting all

  17. 0:28

    we have to do is run ng add angular fire

  18. 0:30

    and then select a corresponding firebase

  19. 0:33

    project that will install the necessary

  20. 0:35

    dependencies and also initialize

  21. 0:36

    firebase in this project and another

  22. 0:38

    cool thing is that it hooks into the new

  23. 0:40

    builder API at angular 8 which allows us

  24. 0:42

    to run a command to deploy this project

  25. 0:44

    to firebase hosting in other words you

  26. 0:46

    can go from zero to a deployed app with

  27. 0:48

    just two commands the next new feature

  28. 0:50

    you should be aware of is the

  29. 0:51

    integration of firebase performance I

  30. 0:53

    already have an entire video on this

  31. 0:55

    topic and adding firebase perf to your

  32. 0:57

    project is pretty much a no-brainer but

  33. 0:59

    angular fire is not just a wrapper for

  34. 1:01

    performance it extends it with

  35. 1:02

    additional functionality specifically

  36. 1:04

    for rxjs you can get basic performance

  37. 1:07

    reporting with a single line of code or

  38. 1:08

    you can use one of the custom rxjs

  39. 1:10

    operators to run a manual trace this

  40. 1:12

    makes it really easy to measure the

  41. 1:13

    performance of things like HTTP calls

  42. 1:15

    because all you have to do is pipe in

  43. 1:17

    this custom operator and everything else

  44. 1:19

    happens for you automatically the third

  45. 1:21

    new feature is my favorite and that's

  46. 1:22

    because I wrote the code for it and it's

  47. 1:24

    just a new option on value changes when

  48. 1:26

    listening to the value of a document or

  49. 1:28

    collection the option is called ID field

  50. 1:31

    and it allows you to return the document

  51. 1:33

    ID in addition to the document data when

  52. 1:36

    working with firestore you often need

  53. 1:37

    the document data to show in the UI and

  54. 1:39

    then you need the ID itself to make

  55. 1:41

    updates or rights to the database but

  56. 1:43

    combining the document ID with the data

  57. 1:45

    is an overly complex process in my

  58. 1:47

    opinion value changes returns an

  59. 1:49

    observable that emits a JavaScript

  60. 1:51

    object or an array of objects the ID

  61. 1:53

    field argument is optional and it will

  62. 1:55

    return the document ID map to a specific

  63. 1:57

    property on the object so this allows

  64. 1:59

    you to specify the property name for the